Welcome! Log In Create A New Profile

Advanced

Nginx is killing my threads

June 18, 2015 01:25PM
I have an application in C++ we originally made for Windows using Microsoft's http lib, that I have ported to be cross-platform using nginx. To keep it working mostly the same (rewriting as little as possible), I made it as a lib that gets loaded by a module I made for nginx that communicates with it via a C interface with simple functions (startup, shutdown, callEndpoint). It works for any calls that don't depend on threads, but anything that depends on the worker threads that we create (not using nginx's apis) doesn't work. When I attach to either of the nginx processes with gdb and do `info threads`, I only see one thread each.

I set our function that loads the lib, then calls startup(), which launches these worker threads, as the "init module" function. The handle for the lib remains so many of the calls work just fine. But the threads are gone, so anything that depends on these worker threads doesn't function (it freezes actually). Is there a way to let my module start threads without having to use nginx's api or otherwise drastically change my architecture?
Subject Author Posted

Nginx is killing my threads

pinkboi June 18, 2015 01:25PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 258
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready