I have a program written in python (version 2.7.4) which has 3 threads.
One thread is processing some data and does some web service requests , the other (MONITOR THREAD) inserts the data in a database and the other is responsible to open a monitor a vpn connection.
In order to do that it uses the openvpn client (ubuntu linux). It does that by invoking
subprocess.Popen(openvpn_cmd)
the above command does a fork, as I understood, each time is executed.
This command is executed every hour. After 3-4 executions the following exception occurs:
OSError: [Errno 12] Cannot allocate memory
Is there any way to avoid this behavior?