-
-
Notifications
You must be signed in to change notification settings - Fork 909
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
Nginx-unit unable to cache big client queries #506
Comments
With which user do you run the NetBox Docker container? Also uid |
I have some constraints to run the container (pod) as root (UID 0) inside a K8S Cluster. Are the permissions of dir |
Unit changes it's permissions at runtime if it runs as root aparently, as described in #509 (comment). This does not happen if it does not run as root. |
Current Behavior
When we try to send a big bulk update query to the Netbox API, Nginx-Unit respond with a HTTP 503 error code.
The big client queries are actually cached to a temporary directory
/opt/unit/tmp/
before sending the query to WSGI. This directory is not writable by nginx-unit workers (username: unit / userid: 101)bash-5.1# ls -lah total 0 drwxrwxr-x 4 root root 30 Apr 28 06:04 . drwxr-xr-x 1 root root 32 Apr 28 06:04 .. drwxrwxr-x 2 root root 6 Apr 28 06:04 state drwxrwxr-x 2 root root 6 Apr 28 06:04 tmp
Expected Behavior
To process big client queries, nginx-unit workers should be able to write the query payload into the
/opt/unit/tmp/
directory. The temp folder should have the following owner/group owner:bash-5.1# ls -lah total 0 drwxrwxr-x 4 root root 30 Apr 28 06:04 . drwxr-xr-x 1 root root 32 Apr 28 06:04 .. drwxrwxr-x 2 root root 6 Apr 28 06:04 state drwxrwxr-x 2 root unit 6 Apr 28 06:04 tmp
Suggested Solution
Change ownership of directory
/opt/unit/tmp
to be owned byroot:unit
in the DockerfileDebug Information
docker-compose version
docker version
docker inspect netboxcommunity/netbox:v2.11
docker-compose logs netbox
The text was updated successfully, but these errors were encountered: