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: Apache error mpm_winnt:crit
Author
iztokba



Joined: 15 Mar 2014
Posts: 18
Location: slovenia

PostPosted: Thu 13 Apr '23 8:39    Post subject: Apache error mpm_winnt:crit Reply with quote

Hello

Recently, when the server restarted, I received this error:
[mpm_winnt:crit] [pid 4864:tid 432] (OS 1450)Insufficient system resources exist to complete the requested service. : AH00355: Child: CreateThread failed. Unable to create all worker threads. Created 42 of the 128 threads requested with the ThreadsPerChild configuration directive.
I have not made any changes, and both the server and Apache are updated to the latest patches and versions.

After a while, I try to restart only Apache and then everything starts working normally again.

The RAM appears to have enough capacity, with 10GB out of 32GB in use, and the processor is operating at 10% capacity.

Does anyone have any advice or experience with a similar issue?

Thanks for help
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 312
Location: UK

PostPosted: Fri 14 Apr '23 12:29    Post subject: Reply with quote

You don't say which version of Apache you're using, nor whether it's the 32 or 64 bit version.

Presumably there are other applications running on your server which could be dynamically affecting memory allocation, e.g. middleware / database services?

Your error message shows only 42 threads were created from a ThreadsPerChild limit of 128, which is really low, so my guess is your system memory was very badly fragmented at the point when your Apache restart failed.

That might be the case if Apache is a 32 bit process, which would then be limited to a maximum of 4 GB of address space. So if your Apache is the 32 bit version, I'd recommend switching to 64 bit.

If it's already 64 bit, then I'd suggest you look at some process monitoring to track where the resources are going, e.g. Sysinternals utilities such as Process Explorer, RAMMap, etc.
Back to top
iztokba



Joined: 15 Mar 2014
Posts: 18
Location: slovenia

PostPosted: Fri 14 Apr '23 12:51    Post subject: Reply with quote

Thank you for your response.

I am using the 64-bit version of Apache2.4.57.

When I did a little more research, I found this error: [mpm_winnt:crit] [pid 6028:tid 400] (OS 1455) The paging file is too small for this operation to complete.

Yes, I am also using the latest version 8.0.21 of MYSQL on the server, and when I decreased innodb_buffer_pool_size from 25 to 20 GB, everything was fine.

However, I am wondering why this error only appears when starting the server, but when I manually start the Apache service, it works with 35% of RAM.
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 312
Location: UK

PostPosted: Fri 14 Apr '23 13:22    Post subject: Reply with quote

An interesting problem.

Failing on a server reboot rather suggests process memory and resources within the kernel are still settling down.

I'd be tempted to try and go round this problem, by changing the Apache service startup to be Delayed Start. There are posts on the net that suggest you can increase the startup delay if needbe, by creating a new registry key DWORD at
    HKLM\SYSTEM\CurrentControlSet\services\<service name>\AutoStartDelay
Equally, there are posts which say depending on your server OS, this tweak doesn't work.
Back to top
iztokba



Joined: 15 Mar 2014
Posts: 18
Location: slovenia

PostPosted: Fri 21 Apr '23 8:07    Post subject: Reply with quote

Is this a possible issue? I'm not familiar with this APR.

Changes for APR 1.7.4

*) Fix a regression where writing to a file opened with both APR_FOPEN_APPEND
and APR_FOPEN_BUFFERED did not properly append the data on Windows.
(This regression was introduced in APR 1.7.3) [Evgeny Kotkov]
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 312
Location: UK

PostPosted: Fri 21 Apr '23 11:13    Post subject: Reply with quote

In your original post you said Apache failed to start, since it couldn't create the number of threads defined in your configuration, which would be before Apache starts serving user requests.

So for me, the data append regression issue with APR 1.7.3 isn't going to be the cause of your thread problem.

Your warning over the paging file being too small is relevant. It shows at some point, the committed memory required by the collective processes on your server, exceeded the commit limit (based on RAM + pagefile).

Preceived wisdom over innodb_buffer_pool_size from Oracle suggests a figure of 50% to 75% of available memory, so hopefully your revised figure of 20GB will have made a difference.
Back to top


Reply to topic   Topic: Apache error mpm_winnt:crit View previous topic :: View next topic
Post new topic   Forum Index -> Apache