Opened 10 years ago
Closed 10 years ago
#24549 closed Bug (invalid)
Django with Oracle backend - Application gets killed very often in Ubuntu
Reported by: | rajmohanh | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | rajmohanh | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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?
Change History (7)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Can you also ensure that the threaded
option is configured for your Oracle DB backend settings?
https://docs.djangoproject.com/en/1.7/ref/databases/#threaded-option
comment:3 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
See TicketClosingReasons/UseSupportChannels and please reopen if the conclusions lead to a bug or improvement in Django.
comment:4 by , 10 years ago
Sorry for the delay in replying. I was trying with oraclepool and other pools to fix the issue.
None of them solved it - in between I missed this post.
The threaded option is configured in Oracle. Please find below -
ORACLE_DATABASES = { 'default': { # Default Oracle Settings 'CONN_MAX_AGE': 60, }, 'OPTIONS': { 'threaded': True, }, }
Still the issue persists. With oraclepool, there were many other issues coming up.
I am completely stuck on this. I have been trying to fix this for a long time, but no solutions :-(
comment:5 by , 10 years ago
Cc: | added |
---|---|
Resolution: | invalid |
Status: | closed → new |
comment:6 by , 10 years ago
I really don't know why this is not happening in Windows Machine also?
We ran 10-20 times the load in Windows machine, without issues.
So, I am absolutely flummoxed
comment:7 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
As mentioned before, please see TicketClosingReasons/UseSupportChannels for better channels to get help.
Perhaps you're exceeding the amount of RAM available and triggering the kernel's OOM killer?