Alternative to gunicorn & supervisord via Nginx Unit & systemd #2023

Closed
opened 2025-12-29 17:21:33 +01:00 by adam · 3 comments
Owner

Originally created by @unquietwiki on GitHub (Sep 25, 2018).

Proposed Changes

Justification

supervisord began crashing repeatedly trying to run the "manage.py rqworker" task. I don't think redis likes running alongside NetBox in a container, so probably going to move my own install. But in troubleshooting that, I was able to deprecate use of gunicorn + supervisord, in favor of an Nginx Unit install; and setup a separate systemd service for the task that was crashing. Having the redis task in a systemd service also lets one set the correct LOCALE; which may have been contributing to the failure.

Originally created by @unquietwiki on GitHub (Sep 25, 2018). <!-- NOTE: This type of issue should be opened only by those reasonably familiar with NetBox's code base and interested in contributing to its development. Describe the proposed change(s) in detail. --> ### Proposed Changes - https://github.com/unquietwiki/netbox/blob/develop/scripts/netbox-rqworker.service - https://github.com/unquietwiki/netbox/blob/develop/scripts/netbox-unit.json - https://github.com/unquietwiki/netbox/blob/develop/scripts/nunit-redis-install.sh <!-- Provide justification for the proposed change(s). --> ### Justification **supervisord** began crashing repeatedly trying to run the "manage.py rqworker" task. I don't think redis likes running alongside NetBox in a container, so probably going to move my own install. But in troubleshooting that, I was able to deprecate use of gunicorn + supervisord, in favor of an Nginx Unit install; and setup a separate systemd service for the task that was crashing. Having the redis task in a systemd service also lets one set the correct LOCALE; which may have been contributing to the failure.
adam closed this issue 2025-12-29 17:21:33 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 26, 2018):

I'd like to avoid collecting alternative installation methods. As with any Django project, there are multiple valid approaches to running it, and although the documentation provides one example, we ultimately leave that choice to the user. Introducing additional scripts, while useful, increases the maintenance burden and will inevitably lead to confusion among novice users. Also note that the scripts as you've written them make some assumptions about the installation environment that may or may not be valid.

@jeremystretch commented on GitHub (Sep 26, 2018): I'd like to avoid collecting alternative installation methods. As with any Django project, there are multiple valid approaches to running it, and although the documentation provides one example, we ultimately leave that choice to the user. Introducing additional scripts, while useful, increases the maintenance burden and will inevitably lead to confusion among novice users. Also note that the scripts as you've written them make some assumptions about the installation environment that may or may not be valid.
Author
Owner

@unquietwiki commented on GitHub (Sep 26, 2018):

@jeremystretch I am disappointed, but understand your need to maintain a level of expected consistency. This is the 2nd time you've had to close one of my suggestions / reports: I hope this will not prejudice you against considering any further from my end.

@unquietwiki commented on GitHub (Sep 26, 2018): @jeremystretch I am disappointed, but understand your need to maintain a level of expected consistency. This is the 2nd time you've had to close one of my suggestions / reports: I hope this will not prejudice you against considering any further from my end.
Author
Owner

@candlerb commented on GitHub (Feb 15, 2019):

I'd like to avoid collecting alternative installation methods

Although the documentation currently gives two alternatives for webserver frontend - Apache and Nginx :-)

@candlerb commented on GitHub (Feb 15, 2019): > I'd like to avoid collecting alternative installation methods Although the documentation currently gives two alternatives for webserver frontend - Apache and Nginx :-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2023