haiwen / seafile-docker

A Docker image for Seafile server
Other
544 stars 183 forks source link

`nginx -s reload` has a non zero exit code and prevents `start.py`/seafile from booting when using slow storage #221

Closed tehXor closed 8 months ago

tehXor commented 4 years ago

When I'm trying to boot seafile-mc:latest it will exit with exit code 1. In the logs I see that the command nginx -s reload from start.py exited with a non zero exit code and I also can see that this is the case because it couldn't find the nginx PID file.

I assume this happens since somewhere before nginx would be started but hasn't initialized correctly at that point. I also cannot reproduce this always but most of the time. I probably should add that I'm really using slower HDDs which also have a strong encryption which is making things even slower. For my private use case once the server is running the speed is more than enough for me but I assume this could be responsible for the inconsistent behavior at that point.

I can easily work around it by adding a line time.sleep(10) right before call('nginx -s reload') in start.py and everything works fine.

However it would be nice, if a real check if nginx was initialized already could be added (maybe some other cheap hardware users could profit from something like that as well 😏)