We found the cause of the problem: in python 2.6, a TCP connection is created each time the XML / RPC method is called. Python 2.7, on the other hand, opens one TCP connection for each ServerProxy object and keeps it open (with servers that support keep-alive ). In addition, the class is not thread safe, so simultaneous requests can interfere with each other.
Version 2.6 was apparently thread-safe implicitly, since TCP connections were not reused, and all data related to the connection was apparently stored in variables that were not connected to the common stack.
Thus, possible solutions:
- Create a
ServerProxy object (and implicitly open a TCP connection) for each thread - Block access to one shared
ServerProxy object - Request Queue Implementation
source share