-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Worker Timeout After Restart #35
Comments
Well that's weird. I haven't seen that error, but I have noticed that the first time a spectrogram is created takes considerably longer than subsequent ones. The generation is done with a library called librosa and some code that I copied and pasted as I know little about audio signal analysis. The next time you restart, could you try calling the API directly to see if the error happens? it would be http://apiserver:apiserverport/api/spectrogram/path:filename.png where path:filename is the name of one of the mp3s in your detection directory, complete with the ".mp3" The spectrograms are created on the fly because my assumption is that most of them would never be seen. I should probably at least save them off when they are generated so they don't have to be generated twice. |
Yes, get the same error if calling the spectrogram via API for the first time. After it boots a new worker, hit refresh and it pulls back. |
That’s interesting… I’ll have to see if I can preload the library or something. |
(I'm writing this mostly for my own reference) This looks like gunicorn is timing out, probably because the initial librosa call takes a long time: https://stackoverflow.com/questions/10855197/frequent-worker-timeout Fixing this may just be a matter of increasing the timeout value. |
Not a show stopper, but a consistent issue I am seeing. The first time you try and review a detection after a system restart, I get a timeout of the initial worker. This happens if you play audio or navigate to the Detection Details page. Once the new worker is booted, everything runs as expected.
The text was updated successfully, but these errors were encountered: