Help to close large statement

Hi,

I need to close a large statement (1665 lines) each line related to a invoice, but after a few minuts I receive this message:

File "/usr/lib/python3.9/xmlrpc/client.py", line 1116, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1456, in __request
    response = self.__transport.request(
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1160, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.9/xmlrpc/client.py", line 1173, in single_request
    resp = http_conn.getresponse()
  File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/lib/python3.9/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.9/http/client.py", line 276, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

I think it is a configuration trouble or with resources. I’m using uwsgi but not sure how to add more resources (if it is neccesary).

Thanks in advance!

This sounds like a problem with a proxy on front of Tryton, the tryton server should continue running without problem.

Posting an statment is a large process as it recomputes the state of all sales and purchases related to invoces.

IIRC this was improved on 6.2 series, so if you are using an older version you may consider upgrading to it.

Also you can use a task queue to recompute the sales/purchase state is done in the background and the request does not take so time.

Hope it helps

Thanks for the info,

I’m not using proxy in front of Tryton.

I’m using 6.2.14 but not I don’t know how to use IIRC.

Also, not sure how to use queue, I only configure [queue] section in tryton.conf but don’t know if need to do something else.

[queue]
queue_name = sale
queue_batch = 10

Thanks for the help.

You need to run tryton-worker in a separate step

1 Like

Do I only need to run the script?

I did it but without a response or message.

You need to run the script and it will pick tasks once they are posted.
So when you post the statement, the tasks will be run on the worker instead of on the main trytond process.

1 Like