Open Tintin4257 opened 5 years ago
Hello Tintin, I think this issue is related to this issue also:
https://github.com/nesdis/djongo/issues/348
Have you reached to a solutions? I think that the problem is that Djongo is no managing well large number of threads.
Hi PDK,
For the moment we are still managing the crisis with a lot of try except in the views (a band-aid in short).
But in my spare time I'm working on a more definitive solution.
Hi guys, We have been debugin the version 1.2.33 and we have developed a fix for this error. We have tested this fix in two ways: a) Streessing the application in testing with some scripts that simulate a very high demand scenario b) In Production environment.
The fix works perfectly. Can you use it in the new versions so it can be used widely in the community?
We have edited two files query.py and operators.py. Here are the two files: https://drive.google.com/drive/folders/1VORvPO9GKtR2K8BkeAlsMoVQNHuBnWiN?usp=sharing
Thanks and hope it will be useful!
Bioengineer Patricio Donnelly Kehoe, MSc. PhD. CTO at Kozaca SA, Argentina
Hi guys, We have been debugin the version 1.2.33 and we have developed a fix for this error. We have tested this fix in two ways: a) Streessing the application in testing with some scripts that simulate a very high demand scenario b) In Production environment.
The fix works perfectly. Can you use it in the new versions so it can be used widely in the community?
We have edited two files query.py and operators.py. Here are the two files: https://drive.google.com/drive/folders/1VORvPO9GKtR2K8BkeAlsMoVQNHuBnWiN?usp=sharing
Thanks and hope it will be useful!
Bioengineer Patricio Donnelly Kehoe, MSc. PhD. CTO at Kozaca SA, Argentina
Can you publish a Pull request with the fix ?
Can someone publish this fix please :') Need to use @PDK2020 patch.
I have tried to make a pull request but I cannot find the version 1.2.33 in the repository. I think Master is too different to the version we have worked on. I have also checked with version 1.2.23 but it is also very different.
Hi,
Since several months, we have been using Djongo as a database engine for our APIs in Django RestFramework. Sometimes we noticed irregularities in answers of our APIs: data are different from one request to another, bad authentication for no apparent reason, etc.... (especially when many request are done at the same time) I looked deeper at the problem, and it seems that the overlay applied by Djongo (i.e. transforming sql request into pymongo request and sending the result back to the model manager) creates a problem of alignment for the parameters in different requests. Request run simultaneously and in a large numbers of them.
views.py
Here are the 2 views I call ...
call_request.py
... using this program
Nothing special so. But the result is strange: while I should get 10 times my user name (admin here), sometimes I crash (500), sometimes I am not authenticated (401), and sometimes I even get the name of another user.
Example: log1.txt
The same test with a "classic" database engine from django gives a perfect result (only code 200 and only "admin" in file)
So I put some print() in djongo to see what's wrong:
converters.py
query.py
By redirecting these prints into a file I then understood the origin of the problem:
output.txt
It seems that the User object I get (id=22, alias i2rb5g+9b0y58wai5jn0@sharklasers.com) is not the one I request when I make my SQL request (id=1, alias admin) because of the interference of requests made in parallel for my themes.
Thx for reading and sorry for the long post ! I hope it help