﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24549	Django with Oracle backend - Application gets killed very often in Ubuntu	rajmohanh	nobody	"Hi,

Our system is an application which runs on Ubuntu 14.04.2 LTS/ Apache / Django / Oracle / cx_Oracle.

The application gets killed very often, as many requests are sent to the application. We have tried our level best to overcome this issue, but we couldn't. After debugging, we found that it is happening due to DB Connection Issues.

The same issue can be seen in the development server also - as given below

{{{
[29/Mar/2015 11:47:17] ""POST /*/ HTTP/1.1"" 200 24632
[29/Mar/2015 11:47:17] ""POST /*/ HTTP/1.1"" 200 24632
Killed
(env)rajmohan@o:~/src$ ==
}}}

We could reproduce this problem by running the following code in 
python manage.py shell


{{{
import threading

class MyThread(threading.Thread):
    def run(self):
        name = User.objects.all().first().username

for i in range(90):
   th = MyThread()
   th.start()
}}}

This will kill the application as  -
In [4]: Killed

This issue is there in Apache Server  also. 

Please note that this happens only in Oracle version - In sqlite there are absolutely no issues. 
The same issue does not happen on Windows. Only in our linux boxes.

We tried connection pooling etc, but that didn't solve the problem. Please let me know whether we are doing something very wrong?



"	Bug	closed	Database layer (models, ORM)	1.6	Normal	invalid		rajmohanh	Unreviewed	0	0	0	0	0	0
