Activating SKR03 template module throws error with empty error message

System

Steps to re-produce

On a fresh install, the module account_de_skr03 shows up in the module list and can be activated. An error is thrown with an empty error message, but it eventually shows as being installed after a second try.

After that, the account template can be chosen on the "Create Chart of Accounts from the “Template” dialog.

However, after clicking “Create”, another error message shows up, again showing an empty message dialog. As a result, the chart of accounts could not be created from the template.

Expected behavior

No errors during module activation, and creation of chart of accounts.

If there is a way to investigate this on the back-end level, or if someone knows how to track this down on the front-end, just let me know and I’m happy to dig further into it. The problem for me to start with is that there is no message on the front-end at all.

For me it looks like timeouts. Probably that the module creates a lot of records (without grouping them).
Normally the server keep working even if the client raise an error. After sometimes everything should be working except if there is an error raised by the creation after the timeout. This should appear in the server log.

You hit the nail on the head. The module activation works despite the timeout, the creation of chart of accounts does not though, so I had to find a way to increase timeout.

Here is what made it work:

  • Server: Increase timeout on both the Nginx proxy server, and on the Gunicorn server in the Docker container, both to 240 (!) seconds.
  • Client: Not all browsers wait longer than 120 seconds (and not all allow increasing it). So I used the GtK+ client, and that one was patient enough.

The creation of the chart of accounts eventually took 180 seconds. With the above setup it worked.

For dokumentation: I ran into the same issue with skr04. Since I am working on an Macbook and no ARM rich client is available, i install the module via:

from proteus import config, Model
from tools import create_chart

cfg1 = config.set_trytond(
    'postgresql://postgres:pwd@tryton-postgres:5432/mydb/',
    user='admin',
    config_file='/etc/trytond.conf')
Company = Model.get('company.company')
company, = Company.find([])
create_chart(company, chart='account_de_skr04.root_de')

(Script provided by mds)

On Docker image use:

docker cp ./activate_skr04.py tryton-container:/usr/local/lib/python3.11/dist-packages/trytond/modules/account/tests/
1 Like

In summary:

  • If your request takes under 30 seconds, no adjustment is needed.
  • If your request takes between 30 seconds and 2 minutes, Gunicorn needs the --timeout 120 option set.
  • If your request takes over 120 seconds, Gunicorn needs the --timeout 240 option set, and Chromium-based browsers won’t work, Firefox might work with a setting, GtK±Client works. On a Macbook, you can use a Python script as the one above to run the chart-creation action.
  • It might be necessary to increase timeout on the Proxy server level, but I couldn’t test it as currently the requests take only under a minute.

You can find the Gunicorn command in the Dockerfile or in the docker-compose.yml, in case you use one.

1 Like

@Gruenfischer, thank you, this is extremely helpful.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.