Slow Trytond Server Load on VPS

I’m currently facing an issue with the Trytond server running on a VPS. The server starts successfully, but the loading time is extremely slow, and in some cases, it doesn’t load at all. I’ve checked the server and PostgreSQL configurations, but the performance is still poor.

Here are some details:

The server is running on a VPS with sufficient resources.
The server starts without any major errors, but the interface takes a long time to load.
The PostgreSQL database is connected, but it seems like the server is not responding in a timely manner.
I’ve already restarted Apache and the Trytond server on systemd.
Even when I start trytond -c trytond.conf manually it’s still wont load.
Is there any configuration or performance optimization that I can apply to improve the server’s responsiveness? Could this be related to the network, database, or server settings?

Oh, and here is the conf:

[web]


listen=(ipaddress):8002
#listen = 127.0.0.1:8002
root = /home/username/project/sao

[database]
# uri = database://username:password@host:port/
uri=postgresql://database:databasepass@127.0.0.1:5432/


[jsonrpc]
# Settings for the JSON-RPC network interface
data=/project/sao

I have noticed that with custom tryton installations login can be very slow.
I think the situation was resolved by installing passlib and scrypt, but I do not remember exactly.
Is login slow, or is everything slow?

This you have some logs of the server? From there you can see if there is some slow requests or what is really causing the issue.

Everything is slow, is not loading properly or not even showing anything.

Server log from trytond -c trytond.conf?

(env) username@srv497284:/home/username/project$ trytond -c trytond.conf
['ERROR_CORRECT_H', 'ERROR_CORRECT_L', 'ERROR_CORRECT_M', 'ERROR_CORRECT_Q', 'LUT', 'QRCode', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'base', 'compat', 'constants', 'exceptions', 'image', 'main', 'make', 'run_example', 'util']
['BarcodeNotFoundError', 'BinaryIO', 'CODABAR', 'Code128', 'Code39', 'Dict', 'EAN13', 'EAN13_GUARD', 'EAN14', 'EAN8', 'EAN8_GUARD', 'Gs1_128', 'ISBN10', 'ISBN13', 'ISSN', 'ITF', 'JAN', 'Optional', 'PROVIDED_BARCODES', 'PZN', 'UPCA', 'Union', '__BARCODE_MAP', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'base', 'charsets', 'codabar', 'codex', 'ean', 'errors', 'generate', 'get', 'get_barcode', 'get_barcode_class', 'get_class', 'isxn', 'itf', 'os', 'upc', 'version', 'writer']
1043052 139703938777088 [2025-02-12 11:43:52,880] INFO werkzeug WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://(ipaddress):8002
1043052 139703938777088 [2025-02-12 11:43:52,880] INFO werkzeug Press CTRL+C to quit

When i open the ip address it only loads
image

Could you try with the dev and verbose options? It could provide some insight regarding what is actually going on.

Hi,
running in http://(ipaddress):8002 is kind of weird

its just an ipaddress that i censored and a port. What’s weird about it?

Ouh, it’s just censored. It’s ok then.

Maybe it is due to slow performance of the VPS for filesystem access (I know that some VPS use network FS) or from the network stack.
Maybe you can try to use socket connection against the database instead of network with postgresql://database:databasepass

Also did you check there are enough memory? A setup will all the modules installed may require at least 1G.