Thanks James for your help.

Yeah, you are right, Python is not multi-thread supported, but, I felt it 
should be thread safe in this scenario.

I did further dig and found error message in apache error log showing 
[mpm_event:error] 
[pid 36398:tid 139973512394496] AH00485: scoreboard is full, not at 
MaxRequestWorkers

What does this mean? I googled and people saying that this is apache crash 
and I did check my wsgi log and noticed that each time I saw 500 error, I 
did see crashing happening in apache, but one thing I could not understand 
is that even I saw at certain time all are returning 200, I still see this 
error message in apache log. then only possible explanation is that maybe 
all those 200 returned are the threads not crashed. 

No matter what, I upgraded apache to 2.4.25, I was using 2.4.17, now, I did 
not see crash anymore, and neither 500 response, will monitor the system 
for more time to see it is really fixed.

thanks again for all your help



On Wednesday, May 3, 2017 at 3:18:07 AM UTC-7, James Schneider wrote:
>
>
> Our server has 24 Cores and 192G memory, should be big enough to handle 
> this kind of load? BTW, one more thing I want to mention is that we are 
> using host based docker, possible any config or limitation there?
>
>
> While I'm not familiar with your particular error, it's possible that your 
> problem is in one of these areas:
>
> 1. Your web server is threaded, but your code is not thread safe, and 
> you're hitting a race condition. The object you are expecting to exist has 
> been unexpectedly modified or deleted by another thread. Can't comment 
> further without knowledge of your underlying setup, code, etc. 
> Alternatively, a file being read/written is modified/removed by a different 
> process/thread.
>
> 2. Your underlying web server is not tuned to utilize the hardware you've 
> mentioned. A typical Apache install will not spawn enough workers or 
> threads to use that much horsepower. If your processor, disk, and RAM are 
> not pegged (or close to), you aren't getting the bang for your buck that 
> you thought with a large server (or you may not have enough load to tax it).
>
> 3. Your database may be congested, causing the Django calls to run slowly, 
> possibly resulting in timeouts. Check the DB logs for over-subscription.
>
> 4. There may also be errant clients who are sending incomplete requests, 
> or potentially port scanning where no headers are sent, and you are 
> actually seeing a false-positive log.
>
> Otherwise, you'll need to determine whether the error is coming from 
> Apache receiving headers from the client, or if it is having issues with 
> Django sending the needed headers back to Apache. 
>
> -James
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d55a50b6-dded-42f2-8430-45e18aadbb9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to