Way to increase number of clients? - Printable Version +- TACTIC Open Source (http://forum.southpawtech.com) +-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3) +--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4) +--- Thread: Way to increase number of clients? (/showthread.php?tid=71) |
Way to increase number of clients? - jerlyn06 - 01-28-2020 Hello all, We're on the enterprise version TACTIC 4.3.0.v02, and we're working on building integration tools into our DCC apps. As such, once a file gets 'checked in', it would launch a Python script that changes the status to submitted_for_review. However, very frequently, especially when multiple users are checking in, we receive the following error: Code: Traceback (most recent call last): return self.__send(self.__name, args) File "xmlrpclib.py", line 1602, in __request verbose=self.__verbose File "xmlrpclib.py", line 1283, in request return self.single_request(host, handler, request_body, verbose) File "xmlrpclib.py", line 1316, in single_request return self.parse_response(response) File "xmlrpclib.py", line 1493, in parse_response return u.close() File "xmlrpclib.py", line 800, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: <Fault 1: 'FATAL: sorry, too many clients already\n'> [4528] Failed to execute script tactic_update[/code] Any way to increase the number of clients? RE: Way to increase number of clients? - listy - 01-28-2020 Hi! You should incrase max_connections of Your pqsql server. Hope this helps. Bye RE: Way to increase number of clients? - remkonoteboom - 01-28-2020 Another possible cause of this issue is the config setting <database> ... <pool_max_connections>0</pool_max_connections> ... </database> For most installations, this setting should be 0. What this does is ensure that every request will open only the connection it uses and will close all of them when request exits. If it is not 0, then what will happen is that TACTIC will keep connections open across requests. This will occur for each database connected and for each thread of every python process. This can grow quite large if you have a large number of processes and /or projects. I would only recommend using this if latency to the database connections are a significant factor (we have observed this is Azure managed databases where connections to the database are unacceptably large and forcing a pool requirement) As listy mentioned, you can increase the number of database connections for postgresql, but you may have to increase shared memory and semaphores. For Linux systems, we have used something like: echo "134217728" >/proc/sys/kernel/shmmax echo "134217728" >/proc/sys/kernel/shmall Place an entry in /etc/sysctl.conf like, kernel.shmmax=134217728 kernel.shmall=134217728 You can find more details on the Postgresql website. RE: Way to increase number of clients? - jerlyn06 - 01-30-2020 Thank you @listy and @remkonoteboom. I'll take a look at the postgresql server. RE: Way to increase number of clients? - remkonoteboom - 01-30-2020 Just for completion, my resource for how to do this is: https://www.postgresql.org/docs/9.4/kernel-resources.html |