Skip to content

Commit

Permalink
fix: increase heap limit
Browse files Browse the repository at this point in the history
  • Loading branch information
avsetsin committed Apr 17, 2022
1 parent 4a6f231 commit 308ad6d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/contracts/registry/registry.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class RegistryService implements OnModuleInit {

try {
await this.deleteCachedNodeOperatorsKeys();
this.logger.log('Node Operators cache cleared');
this.logger.warn('Node Operators cache cleared');
} catch (error) {
this.logger.error(error);
process.exit(1);
Expand Down
2 changes: 2 additions & 0 deletions src/health/health.constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export const MAX_BLOCK_DELAY_SECONDS = 5 * 60;

export const MAX_MEMORY_HEAP = 1024 * 1024 * 1024 * 2; // 2 GB
3 changes: 2 additions & 1 deletion src/health/health.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
MemoryHealthIndicator,
HealthCheck,
} from '@nestjs/terminus';
import { MAX_MEMORY_HEAP } from './health.constants';
import { ProviderHealthIndicator } from './provider.health';

@Controller('health')
Expand All @@ -18,7 +19,7 @@ export class HealthController {
@HealthCheck()
check() {
return this.health.check([
async () => this.memory.checkHeap('memoryHeap', 1024 * 1024 * 1024),
async () => this.memory.checkHeap('memoryHeap', MAX_MEMORY_HEAP),
async () => this.provider.isHealthy('RPCProvider'),
]);
}
Expand Down

0 comments on commit 308ad6d

Please sign in to comment.