end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

nginx + supervisord + starlet for perl で 504 Gateway Time-out エラー

starletに「--timeout=1800」を登録するだけでは不十分らしく、 nginx.confに「~_timeout」を追加することで解消

# cat /etc/supervisord.d/splats-starlet.ini
   
[program:splats-starlet]
directory=/home/end0tknr/dev/Splats/script
command=/usr/local/bin/start_server --port=5000 --interval=10 \
        -- /usr/local/bin/plackup -E production --no-default-middleware \
    -s Starlet --max-workers=25 --timeout=1800 --keepalive-timeout=0 \
    --max-reqs-per-child=700 --min-reqs-per-child=1000 \
    /home/end0tknr/dev/Splats/script/splats-server
numprocs=1
autostart=true
autorestart=true
user=shiftkoutei
redirect_stderr=true
stdout_logfile=/home/end0tknr/logs/starlet_error_log
# cat /etc/nginx/nginx.conf

http {
    keepalive_timeout  600;

    proxy_connect_timeout 1800;
    proxy_read_timeout    1800;
    proxy_send_timeout    1800;
      :