[OSGeo] #3131: Getting 500 errors on gitea

#3131: Getting 500 errors on gitea
----------------------------+--------------------------------------
Reporter: robe | Owner: robe
     Type: task | Status: assigned
Priority: normal | Milestone: Sysadmin Contract 2024-I
Component: SysAdmin/Gitea | Keywords:
----------------------------+--------------------------------------
Just noticed it. Might be happening on trac as well.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/3131&gt;
OSGeo <Gter - OSGeo;
OSGeo committee and general foundation issue tracker.

#3131: Getting 500 errors on osgeo7
----------------------+---------------------------------------
Reporter: robe | Owner: robe
     Type: task | Status: assigned
Priority: normal | Milestone: Sysadmin Contract 2024-I
Component: SysAdmin | Resolution:
Keywords: |
----------------------+---------------------------------------
Changes (by robe):

* component: SysAdmin/Gitea => SysAdmin
* summary: Getting 500 errors on gitea => Getting 500 errors on osgeo7

Comment:

Actually this is more than trac. I think it's osgeo7 since my alerts are
going off on other sites on osgeo7
--
Ticket URL: <#3131 (Getting 500 errors on osgeo7) – OSGeo;
OSGeo <Gter - OSGeo;
OSGeo committee and general foundation issue tracker.

#3131: Getting 500 errors on osgeo7
----------------------+---------------------------------------
Reporter: robe | Owner: robe
     Type: task | Status: assigned
Priority: normal | Milestone: Sysadmin Contract 2024-I
Component: SysAdmin | Resolution:
Keywords: |
----------------------+---------------------------------------
Comment (by robe):

It was happening today during our nextcloud meeting. The error logs
showing too many open files.

I upped the max open files limits

By adding these lines to /etc/security/limits.conf as sugested in

500 error - nginx 500 (24: too many open files) - Server Fault

{{{
www-data soft nofile 20000
www-data hard nofile 40000

}}}

Then adding at the top of /etc/nginx/nginx.conf

{{{
worker_rlimit_nofile 16384;
}}}

{{{
systemctl nginx restart
ps -faux #using the root proc for nginx fill in below
cat /proc/<nginx-pid>/limits
}}}

And verified the settings took before the open files soft limit was 1024
after

{{{
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited
seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes unlimited unlimited
processes
Max open files 16384 16384 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 513936 513936
signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us

}}}

I still need to verify if the /etc/security/limits.conf was really
necessary as I don't think it should have been. It seemed without that
putting in the worker_rlimit_nofile 16384; did not take.

I'll keep this open and monitor.
--
Ticket URL: <#3131 (Getting 500 errors on osgeo7) – OSGeo;
OSGeo <Gter - OSGeo;
OSGeo committee and general foundation issue tracker.

#3131: Getting 500 errors on osgeo7
----------------------+---------------------------------------
Reporter: robe | Owner: robe
     Type: task | Status: closed
Priority: normal | Milestone: Sysadmin Contract 2024-I
Component: SysAdmin | Resolution: fixed
Keywords: |
----------------------+---------------------------------------
Changes (by robe):

* resolution: => fixed
* status: assigned => closed

--
Ticket URL: <#3131 (Getting 500 errors on osgeo7) – OSGeo;
OSGeo <Gter - OSGeo;
OSGeo committee and general foundation issue tracker.