[Django] #24549: Django with Oracle backend - Application gets killed very often in Ubuntu

29 views
Skip to first unread message

Django

unread,
Mar 29, 2015, 9:31:42 AM3/29/15
to django-...@googlegroups.com
#24549: Django with Oracle backend - Application gets killed very often in Ubuntu
----------------------------------------------+--------------------
Reporter: rajmohanh | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
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?

--
Ticket URL: <https://code.djangoproject.com/ticket/24549>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 29, 2015, 11:04:40 AM3/29/15
to django-...@googlegroups.com
#24549: Django with Oracle backend - Application gets killed very often in Ubuntu
-------------------------------------+-------------------------------------

Reporter: rajmohanh | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.6
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Perhaps you're exceeding the amount of RAM available and triggering the
kernel's OOM killer?

--
Ticket URL: <https://code.djangoproject.com/ticket/24549#comment:1>

Django

unread,
Mar 29, 2015, 6:36:33 PM3/29/15
to django-...@googlegroups.com
#24549: Django with Oracle backend - Application gets killed very often in Ubuntu
-------------------------------------+-------------------------------------

Reporter: rajmohanh | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.6
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by jarshwah):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24549#comment:2>

Django

unread,
Mar 30, 2015, 7:55:49 AM3/30/15
to django-...@googlegroups.com
#24549: Django with Oracle backend - Application gets killed very often in Ubuntu
-------------------------------------+-------------------------------------
Reporter: rajmohanh | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: 1.6
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => invalid


Comment:

See TicketClosingReasons/UseSupportChannels and please reopen if the
conclusions lead to a bug or improvement in Django.

--
Ticket URL: <https://code.djangoproject.com/ticket/24549#comment:3>

Django

unread,
Apr 9, 2015, 6:21:46 AM4/9/15
to django-...@googlegroups.com
#24549: Django with Oracle backend - Application gets killed very often in Ubuntu
-------------------------------------+-------------------------------------
Reporter: rajmohanh | Owner: nobody

Type: Bug | Status: closed
Component: Database layer | Version: 1.6
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by rajmohanh):

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 :-(

--
Ticket URL: <https://code.djangoproject.com/ticket/24549#comment:4>

Django

unread,
Apr 9, 2015, 6:38:19 AM4/9/15
to django-...@googlegroups.com
#24549: Django with Oracle backend - Application gets killed very often in Ubuntu
-------------------------------------+-------------------------------------

Reporter: rajmohanh | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.6
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by rajmohanh):

* cc: rajmohanh (added)
* status: closed => new
* resolution: invalid =>


--
Ticket URL: <https://code.djangoproject.com/ticket/24549#comment:5>

Django

unread,
Apr 9, 2015, 7:01:08 AM4/9/15
to django-...@googlegroups.com
#24549: Django with Oracle backend - Application gets killed very often in Ubuntu
-------------------------------------+-------------------------------------

Reporter: rajmohanh | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.6
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by rajmohanh):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/24549#comment:6>

Django

unread,
Apr 9, 2015, 7:36:07 AM4/9/15
to django-...@googlegroups.com
#24549: Django with Oracle backend - Application gets killed very often in Ubuntu
-------------------------------------+-------------------------------------
Reporter: rajmohanh | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: 1.6
(models, ORM) |
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => invalid


Comment:

As mentioned before, please see TicketClosingReasons/UseSupportChannels
for better channels to get help.

--
Ticket URL: <https://code.djangoproject.com/ticket/24549#comment:7>

Reply all
Reply to author
Forward
0 new messages