Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy behaviour when parallel requests #223

Open
pirhoo opened this issue Oct 24, 2013 · 10 comments
Open

Lazy behaviour when parallel requests #223

pirhoo opened this issue Oct 24, 2013 · 10 comments

Comments

@pirhoo
Copy link
Contributor

pirhoo commented Oct 24, 2013

Hi,

I have a curious behaviour that I still can't explain after 2 days of investigation. When I execute several queries with neo4django at the same time (or very close), the process gets lazy and the request never ends (probably because the previous one is not done).

I got this bug with neo4j 1.8.2 and 1.9.1, and Django 1.4.4 and 1.5.4. I can't give more detail because the only way to provoke this bug is to madly refresh a page.

Thanks for the amazing work,
Pierre

@mhluongo
Copy link
Member

Hm, there is some transactional logic related to the in-graph type tree- maybe that's involved? What sort of requests are they, read or write?

@pirhoo
Copy link
Contributor Author

pirhoo commented Oct 25, 2013

Mainly read and without any particular conditions: I succeed to reproduce this bug with a simple User.objects.all() (among 20 nodes).

@mhluongo
Copy link
Member

Hm, that's no good. Is it using the dev server or in production? If it were reproducible using, say, the requests library and threads, that'd be easier to test & fix.

@pirhoo
Copy link
Contributor Author

pirhoo commented Oct 25, 2013

Interesting: it seems that the bug doesn't happen in production (on heroku).

@mhluongo
Copy link
Member

Aha! Good, I was worried. It might be because the Django dev server is
threaded, while production is usually process-based. To test that I believe
there's a '--nothreading' (or similarly named) argument to runserver.
Maybe give that a shot? Regardless this sounds like a bug, but we'll see
whether it's a big or little one.
On Oct 25, 2013 5:56 PM, "Pierre Romera" [email protected] wrote:

Interesting: it seems that the bug doesn't happen in production (on
heroku).


Reply to this email directly or view it on GitHubhttps://github.com//issues/223#issuecomment-27129143
.

@pirhoo
Copy link
Contributor Author

pirhoo commented Oct 25, 2013

OK, that sounds reassuring. I'm trying what you propose.

@tonjo
Copy link
Contributor

tonjo commented Oct 25, 2013

Hmm, and threading would worsen performance?
Il 26/ott/2013 00:07 "Pierre Romera" [email protected] ha scritto:

OK, that sounds reassuring. I'm trying what you propose.


Reply to this email directly or view it on GitHubhttps://github.com//issues/223#issuecomment-27129742
.

@pirhoo
Copy link
Contributor Author

pirhoo commented Oct 25, 2013

Ha! Good news: the --nothreading option fix it, thanks!

I don't think we can consider this issue as solved so I let you decide if we should close it.

@mhluongo
Copy link
Member

No, I'll leave it open. It's going to be fun to debug :)
On Oct 25, 2013 6:19 PM, "Pierre Romera" [email protected] wrote:

Ha! Good news: the --nothreadinghttps://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-option---nothreadingoption fix it, thanks!

I don't think we can consider this issue as solved so I let you decide if
we should close it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/223#issuecomment-27130367
.

@pirhoo
Copy link
Contributor Author

pirhoo commented Oct 25, 2013

OK, you're the boss. Thanks again, you saved my weekend!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants