Well, I think it is thread safe. The mod_wsgi application is an end point for an ajax request, which it forwards to the multi-threaded backend server over a zeromq socket (using a linux ipc socket), polls for a response for up to 30 seconds, and returns the json result or failure to the ajax caller's callback function. It then terminates. All of this is password protected using apache mod_auth, part of the reason I didn't just use uwsgi.
On Thu, Aug 9, 2018 at 7:30 PM, Graham Dumpleton <[email protected] > wrote: > > > > On 10 Aug 2018, at 9:22 am, Tim Moody <[email protected]> wrote: > > > > Thanks for replying so quickly. The message is indeed a print statement > in my python wrapper. It was the wsgi.error that threw me off. So I guess > it is really an info message. > > > > However, I still get failed connections, but perhaps these are from > zeromq and not from mod_wsgi. However, to be sure, I should say that I am > not using WSGIDaemonProcess but only WSGIScriptAlias and all other defaults > (on 4.3.0 Ubuntu 16.04). Is there any chance that mod_wsgi will be starved > for connections if 8 requests arrive nearly simultaneously? > > Is your use of the client for backend service thread safe? > > A typical configuration for Apache/mod_wsgi means that you have multiple > threads per process handling requests, so you have to be careful to ensure > that each request has own client instance, or if one client instance that > can handle multithread access okay. > > Anyway, how many concurrent requests mod_wsgi can handle for embedded mode > is dictated by Apache MPM settings. This is unrelated though to backend > connections and whether limits enforced by backend service. If capacity to > handle more requests had been reached as Apache MPM settings low, requests > would just queue up and never get to the application until free capacity, > so not going to affect anything in backend connections for those requests > which are able to be handled. > > Graham > > -- > You received this message because you are subscribed to a topic in the > Google Groups "modwsgi" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/modwsgi/HMKpmmNacX4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/modwsgi. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
