P is for Practical | |
PerlMonks |
upstream prematurely closed connection while reading response header from upstreamby Digioso (Sexton) |
on Feb 24, 2023 at 13:59 UTC ( [id://11150577]=perlquestion: print w/replies, xml ) | Need Help?? |
Digioso has asked for the wisdom of the Perl Monks concerning the following question: Hi, I've setup a server and installed HestiaCP as a server management tool to install & control NGINX, Apache, Databases, .... It's an Ubuntu 22.04 server Unfortunately HestiaCP doesn't support Perl, so I installed the package for Mod_Perl myself and changed the Apache configuration accordingly. Now I started migrating stuff from my old webhoster to the new server. And... now I'm facing lots of problems. The problems seem to only occur when I use self-written modules. Using pre-existing modules doesn't cause any problems. The scripts and modules were running perfectly fine on my old webhoster. I just needed to change a few paths in the scripts/modules to refelct the new locations. So I am pretty sure that I do not have a syntax error or something like that. Around 50% of the time I can see in the web server log messages like these:
So... 50% of the time the page loads, 50% it doesn't. The upstream errors point to NGINX (at least all the search results I found on Google point there), but I couldn't find anything even remotely connected to my issue. Links to test:https://digioso.tk/test.pl <- I am using a self-writte module here and the issue occurs like 50% of the time. The website runs into error 500 and I can see the above upstream message in my webserver logfile. If you don't get error 500 immediately - please refresh the page a couple of times. https://digioso.tk/test2.pl <- No self-written modules. Runs perfectly fine. Source code: test.pl test2.pl Navi.pm (located in /home/digioso/web/digioso.tk/stuff):
So basically test1 outputs the same as test2. Only difference is that starting and ending HTML is done via a module. The original Navi.pm contains many more things (eg including CSS and so on), but for demonstration purposes I thinned it down to the above.
Back to
Seekers of Perl Wisdom
|
|