[fix] Jobs starting slowly
See original GitHub issueDescribe the bug
Node.js version: 18.4.0
OS version: Container-Optimized OS with containerd (cos_containerd)
Description: It took ~30 seconds to start a Job
Actual behavior
The thread/worker goes online fast, but actual code execution starts after ~30 seconds.
Expected behavior
Code execution to start within a second.
Code to reproduce
/* eslint-disable import/first */
console.log('[start-scheduled-stages] Import modules')
import { startScheduledStages } from '@fastcup/backend-common/tournaments/stages/handle/schedule-stages'
import logger from '@fastcup/backend-common/log'
import { isTournamentAutomationEnabled } from '../utils/index.js'
import { initSentry } from '../utils/sentry.js'
initSentry()
logger.info('[start-scheduled-stages] Start')
if (await isTournamentAutomationEnabled()) {
await startScheduledStages()
} else {
logger.warn('Tournament automation is disabled')
}
logger.info('[start-scheduled-stages] done')
Checklist
- I have searched through GitHub issues for similar issues.
- I have completely read through the README and documentation.
- I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:10 (5 by maintainers)
Top Results From Across the Web
8 Ways to Fix Slow Boot Times in Windows 10 - MakeUseOf
Thankfully, slow booting is a solvable issue. We'll show you the most common fixes for slow startup problems in Windows 10. This guide...
Read more >What to Do When Work Is Slow - Harvard Business Review
What to Do When Work Is Slow · Make a plan · Getting More Work Done · Develop yourself · Get ahead ·...
Read more >How to Fix Slow Startup on Windows 10 | SoftwareKeep
Method 2: Disable processes with high startup impact · Right-click on your taskbar and choose “Task Manager” from the context menu. · Otherwise,...
Read more >Fix Slow Boot “A start job is running …” in Ubuntu 18.04
Fix Slow Boot “A start job is running …” in Ubuntu 18.04. gnome shell. Ubuntu 18.04 is quite slow to boot up in...
Read more >Windows 10 slow Startup and Start Menu not working
If lot of programs are running on the start up that it makes the start up slower. I suggest you to check the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is there a way to cache imports in worker_threads?
hmm interesting. One solution could be to use longer running jobs. another solution might be to reduce the size of the imports so they load faster.