Is it a bad idea to develop in mod_perl2?

Are there any contraindications to fork in mod_perl2? Should I use a different way to start the background process in mod_perl2?

+3
source share
2 answers

I usually use a cleanup handler to run everything that should happen after the HTTP request has completed:

$r->push_handlers( PerlCleanupHandler => sub { print "I'm doing stuff!" } );

If you really need to make the plug, you should not do it in the usual way, because your forked process will interfere with the various resources that Apache needs, such as file descriptors and sockets, and it’s very difficult to handle all this correctly. Try Apache2 :: Instead: Subprocess .

+4

Source: https://habr.com/ru/post/1739337/


All Articles