logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Moving from Windows to Linux
Author
matrixebiz



Joined: 27 Sep 2017
Posts: 26

PostPosted: Tue 05 Dec '17 20:04    Post subject: Moving from Windows to Linux Reply with quote

Hello, looking for some easy alternatives to programs I use in Windows before I make the switch.

1) What program can I use to monitor a Wine program and if it crashes then to have it auto re-start?
2) I have a batch file restarting the Apache Service when it crashes, do I have to worry about this with Apache for Linux?
3) I have a Python script running every 90 Seconds, do I have to create a Cronjob that runs minimum every minute?
4) Should I Enable Apache Event MPM;
https://scottlinux.com/2014/06/18/switch-to-or-enable-apache-event-mpm-in-ubuntu-14-04-for-http-connections/

Thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 06 Dec '17 19:31    Post subject: Reply with quote

to 1) and 2) Install apache as a service with systemd so the OS itself will restart the app.

for 3) see https://www.apachelounge.com/viewtopic.php?p=36221#36221 PLEASE DO NOT POST THINGS DOUBLE

to 4) it depends on your needs and what you want to run on your server.
Back to top
matrixebiz



Joined: 27 Sep 2017
Posts: 26

PostPosted: Wed 06 Dec '17 23:16    Post subject: Reply with quote

Hello,
1) So since I'll be installing Debian 8 and systemd is the init system, I shouldn't need to worry about it then?
3) sorry
4) A Streaming Webserver - many users accessing many files simultaneously

How do I know if I'm using the mpm_worker_module in a Windows Apache installation?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 07 Dec '17 17:15    Post subject: Reply with quote

Apache on windows always uses the winnt mpm. There is no other mpm available for windows Wink
if you serve only static content like streaming you should use event mpm.
Back to top
matrixebiz



Joined: 27 Sep 2017
Posts: 26

PostPosted: Thu 07 Dec '17 18:17    Post subject: Reply with quote

Hi James, it's a streaming server so content is always changing. How do I have it changed to use the event mpm and what settings should I use?

Also, what do these errors mean and how can I fix?
This is my mpm.conf;
<IfModule mpm_winnt_module>
ThreadsPerChild 1000
MaxConnectionsPerChild 1000
</IfModule>

[Thu Dec 07 08:59:22.738314 2017] [mpm_winnt:notice] [pid 8536:tid 168] AH00354: Child: Starting 1000 worker threads.
[Thu Dec 07 08:59:32.677342 2017] [mpm_winnt:notice] [pid 2220:tid 560] AH00364: Child: All worker threads have exited.
[Thu Dec 07 08:59:49.328681 2017] [mpm_winnt:notice] [pid 8536:tid 168] AH00358: Child: Process exiting because it reached MaxConnectionsPerChild. Signaling the parent to restart a new child process.
[Thu Dec 07 08:59:49.328681 2017] [mpm_winnt:notice] [pid 1340:tid 628] AH00424: Parent: Received restart signal -- Restarting the server.
[Thu Dec 07 08:59:50.219352 2017] [ssl:warn] [pid 1340:tid 628] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Dec 07 08:59:50.250641 2017] [mpm_winnt:notice] [pid 1340:tid 628] AH00455: Apache/2.4.26 (Win32) OpenSSL/1.0.2l PHP/7.1.7 configured -- resuming normal operations
[Thu Dec 07 08:59:50.250641 2017] [mpm_winnt:notice] [pid 1340:tid 628] AH00456: Apache Lounge VC14 Server built: Jun 15 2017 12:39:41
[Thu Dec 07 08:59:50.250641 2017] [core:notice] [pid 1340:tid 628] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Dec 07 08:59:50.250641 2017] [mpm_winnt:notice] [pid 1340:tid 628] AH00418: Parent: Created child process 3264
[Thu Dec 07 08:59:51.078805 2017] [ssl:warn] [pid 3264:tid 540] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Dec 07 08:59:51.219445 2017] [ssl:warn] [pid 3264:tid 540] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Dec 07 08:59:51.250697 2017] [mpm_winnt:notice] [pid 3264:tid 540] AH00354: Child: Starting 1000 worker threads.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 07 Dec '17 19:33    Post subject: Reply with quote

You can NOT change the mpm on windows. There is only one => winnt mpm. event mpm is for *nix systems only ( including debian).

Streaming is static content. Dynamic content is something like a script that generates the content on the fly.

Quote:
Child: Process exiting because it reached MaxConnectionsPerChild. Signaling the parent to restart a new child process.


set MaxConnectionsPerChild to 0 ( zero )
Code:

MaxConnectionsPerChild 0


Quote:

server certificate does NOT include an ID which matches the server name


that is not a valid SSL certificate
Back to top
matrixebiz



Joined: 27 Sep 2017
Posts: 26

PostPosted: Thu 07 Dec '17 20:10    Post subject: Reply with quote

Okay, thanks for the info, so because;
www.example.com:443:0

is just what they use in the default code, I don't have to worry about this, correct? or am I supposed to create a valid SSL certificate and put the domain of my server?

I didn't use MaxConnectionsPerChild 0 because I read that if there is a run away then can cause issues and use up all the server memory leak hanging Apache but I guess I can just increase it to like 10000


Do you know what would cause this;

[Thu Dec 07 13:24:20.157731 2017] [mpm_winnt:notice] [pid 18292:tid 488] AH00354: Child: Starting 1000 worker threads.

VirtualAlloc() failed: [0x00000008] Not enough storage is available to process this command.

VirtualFree() failed: [0x000001e7] Attempt to access invalid address.

Can't initialize heap: [0x000001e7] Attempt to access invalid address.

[Thu Dec 07 13:25:08.241626 2017] [mpm_winnt:notice] [pid 12244:tid 616] AH00428: Parent: child process 18292 exited with status 255 -- Restarting.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 18 Dec '17 22:55    Post subject: Reply with quote

why :443:0 ??

You can use let's encrypt to get a valid certificate for free.

mpm_winnt so you are running apache on windows, not like the title says changing to linux.
However

Please remove you mpm settings ( make a backup or not)

and use

Code:

<IfModule !mpm_netware_module>
    PidFile "logs/httpd.pid"
</IfModule>
# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxConnectionsPerChild: maximum  number of requests a server process serves
<IfModule mpm_winnt_module>
    ThreadsPerChild      150
    MaxConnectionsPerChild    0
</IfModule>


please report if apache runs with that.
Back to top
matrixebiz



Joined: 27 Sep 2017
Posts: 26

PostPosted: Sat 23 Dec '17 2:06    Post subject: Reply with quote

Hello, yes, that's what I ended up doing. Thanks
Back to top


Reply to topic   Topic: Moving from Windows to Linux View previous topic :: View next topic
Post new topic   Forum Index -> Apache