RT5.0.2 - FCGI dies without any notifications/logs

Hi all,
I have recently upgrade a production server to 5.0.2.
My current system setup is: RT / EXIM4 / Nginx (on Ubuntu 20.04)
After going over all logs and cleaning up all critical errors I have now a relatively stable system.
Relatively because once in a while (every few hours during work time) FCGI disappears from the process list without a trace and we get a gateway timeout in our browsers.
So far I did not notice any issue during the night but maybe this is just a coincidence. There are about 10 daily users.

This is the command I normally run:
spawn-fcgi -u www-data -g www-data -a 127.0.0.1 -p 9000 – /opt/rt5/sbin/rt-server.fcgi
During my research I also ran from the command line
spawn-fcgi -n -u www-data -g www-data -a 127.0.0.1 -p 9000 – /opt/rt5/sbin/rt-server.fcgi
(notice the -n switch) which identified one configuration error in RT_SiteConfig.pm that did not show up on any other logs but that did not resolve my issue of silent deaths.

My nginx config:

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;

    return 301 https://$host$request_uri;

}

server {
listen 443 ssl;
listen [::]:443 ssl;

    server_name helpdesk.XXXXXXX.com;

    include snippets/ssl.conf;
    include snippets/ssl-params.conf;

    access_log /var/log/nginx/rt_access.log;
    error_log  /var/log/nginx/rt_error.log notice;

    client_body_buffer_size 10M;
    client_max_body_size 100M;

    location / {
            include snippets/fastcgi-rt.conf;
    }

    location /NoAuth/images {
            root /opt/rt5/share/html;
    }

}

And I suppose the most important snippets/fastcgi-rt.conf:

fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_param SCRIPT_NAME “”;
fastcgi_param PATH_INFO $uri;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;

fastcgi_param HTTPS on;

fastcgi_pass 127.0.0.1:9000;
fastcgi_buffer_size 4K;
fastcgi_buffers 512 4k;

If anyone has any solution for a fix or ideas how to investigate further this issue I am all ears.
Of course I am happy to provide more logs and settings if required.

/Regards
Filip

Hey Filip,

You might be running into this issue: Why does RT's FCGI server not handle SIGPIPE?

Hey Andrew,
Applied the fix I will post back my results once I am back from my holidays.

Cheers

@Andrew_Ruthven
Stable for 6 days now!

Thanks again