jvvan / reverseproxy

Reverse Proxy API powered by Nginx.
MIT License
13 stars 1 forks source link

[bug] Using it more times can make nginx crash #8

Closed anondev-sudo closed 2 years ago

anondev-sudo commented 2 years ago

When you use it like 2 times in a row, it makes nginx to crash.

I tried doing nginx -s reload in console more times, and nginx stopped. I think that the restart commands should be changed to something else, like systemctl restart nginx. Tried to use this command 10 times and it has not crashed.

Nginx logs after it crashed image

jvvan commented 2 years ago

It looks like an Nginx bug to crash after a few reload signals. The reason I don't want to use systemctl is that not everyone uses systemctl to manage services. Also if you use systemctl restart nginx, it can fail to restart and can't be started again because of a bad config. Reloading also doesn't restart the whole service, it hot reloads the configuration files, so it won't reset existing connections.

anondev-sudo commented 2 years ago

So what should I do with it?

Also if you use systemctl restart nginx, it can fail to restart and can't be started again because of a bad config. Reloading also doesn't restart the whole service, it hot reloads the configuration files, so it won't reset existing connections.

And when you use nginx -s reload, it won't fail to restart?

anondev-sudo commented 2 years ago

I have fixed it myself by editing command that will restart nginx in the code to systemctl restart nginx and now it did not crash

jvvan commented 2 years ago

This looks like a bug in Nginx, the issue will stay closed for now.