Server Request error ?

26 views
Skip to first unread message

Didi Supardi

unread,
Feb 18, 2026, 9:17:40 AM (11 days ago) Feb 18
to Jam.py Users Mailing List
My application is running jam.py v5.

It's installed on an Ubuntu VPS.

Sometimes I get the error "Server request error." Why is that?

setting gunicorn

[Unit]
Description = gunicorn daemon for vdr pusat
After =  network.target

[Service]
User=www-data
Group=www-data
WorkingDirectory = /var/www/html/vdr_ind/
ExecStart = gunicorn --bind 0.0.0.0:8081 --workers 5 --access-logfile vdr_access.log --erro>
ExecReload= /bin/kill -s HUP $MAINPID
KillMode=mixed
TimeoutStopSec =5
PrivateTmp=true

[Install]
WantedBy = multi-user.target

setting nginx
server {
    server_name xxx.cloud-ledger.com;



    location /static/ {
        alias /var/www/html/vdr_ind/static/;
    }

    location / {
        proxy_pass http://0.0.0.0:8081;
        proxy_connect_timeout 300;
        proxy_send_timeout 300;
        proxy_read_timeout 300;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

}WhatsApp Image 2026-02-18 at 16.31.50.jpeg

Drazen Babic

unread,
Feb 18, 2026, 11:56:10 AM (11 days ago) Feb 18
to Didi Supardi, Jam.py Users Mailing List
This is not the question for Jam, but for Nginx and Gunicorn.

Let me put it this way, I was running Jam 5 with N applications  and never got this issue (*).
Why? Because Jam is a wsgi. And you are not running pure wsgi, but proxy with gunicorn.
This is basically running a software on top of software, on top of Python.

If u ask Gunicorn devs they would tell u its Python app with issues ;) If u ask Nginx they will blame unicorn.
Then see *.

Apache has full wsgi support. 
--
You received this message because you are subscribed to the Google Groups "Jam.py Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jam-py+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jam-py/b8cc802c-179b-4126-b285-190f86ccdcdbn%40googlegroups.com.

Didi Supardi

unread,
Feb 18, 2026, 8:25:11 PM (11 days ago) Feb 18
to Jam.py Users Mailing List
I've used Apache server, but when I used multiple ports 8081, 8082, and 8083, it sometimes got messed up loading and saving programs and data. I switched to using Gunicorn + Nginx, and it worked fine. Sometimes I get errors like server request errors. Could it be due to the internet?

Dean D. Babic

unread,
Feb 19, 2026, 7:38:13 AM (10 days ago) Feb 19
to Jam.py Users Mailing List
Right, 

where do you actually call wsgi application in the above code?
ExecStart = gunicorn --bind 0.0.0.0:8081 --workers 5 --access-logfile vdr_access.log --erro>


it specifically says:
gunicorn wsgi

So I bet my money that you are running: server.py 8081 which is than proxied by Nginx from here:
proxy_pass http://0.0.0.0:8081

Dean D. Babic

unread,
Feb 20, 2026, 2:09:31 AM (9 days ago) Feb 20
to Jam.py Users Mailing List
Simple ChatGpt says this:
upstream gunicorn {
    server 127.0.0.1:8000;
    keepalive 32;  # Number of idle keep-alive connections to maintain
}

server {
    location / {
        proxy_pass http://gunicorn;
        proxy_http_version 1.1;           # CRITICAL: HTTP/1.1 required for keep-alive
        proxy_set_header Connection "";    # CRITICAL: Prevents "Connection: close" header

Dean D. Babic

unread,
Feb 20, 2026, 2:14:40 AM (9 days ago) Feb 20
to Jam.py Users Mailing List
Plus:

# When starting Gunicorn
gunicorn --keep-alive 5 ...  # Default is 2 seconds, increase to match Nginx

# Or in a config file
keepalive = 5  # seconds
Reply all
Reply to author
Forward
0 new messages