Resource temporarily unavailable: AH00480: apr_thread_create: unable to create worker thread

SmaragdnaDolina

Verified User
Joined
May 6, 2020
Messages
39
Hello!

I am getting this type of error:

Resource temporarily unavailable: AH00480: apr_thread_create: unable to create worker thread

after my provider suggested a migration from CentOs to Ubuntu.

The backup/restore of my accounts was done, the files and overall DA structure are there, but Apache is unable to serve the files.

Here are a few more lines from the Apache Error Log:

[Wed Jun 09 05:14:03.288163 2021] [lbmethod_heartbeat:notice] [pid 744:tid 139680405668288] AH02282: No slotmem from mod_heartmonitor
[Wed Jun 09 05:14:03.681808 2021] [mpm_event:alert] [pid 783:tid 139680405668288] (11)Resource temporarily unavailable: AH00480: apr_thread_create: unable to create worker thread
[Wed Jun 09 05:14:03.682845 2021] [mpm_event:alert] [pid 789:tid 139680405668288] (11)Resource temporarily unavailable: AH00480: apr_thread_create: unable to create worker thread
[Wed Jun 09 05:14:03.683254 2021] [mpm_event:error] [pid 744:tid 139680405668288] (11)Resource temporarily unavailable: AH00481: fork: Unable to fork new process

There is more, but before flooding the forum I have a simple question (* a silly one perhaps, but I am only an end user = can move around a server and do some minor changes, but I lack real knowledge of Unix systems):

---- does it make any sense to try migrating a DA installation from CentOS to Ubuntu in the first place?

My provider's idea. To me, it doesn't look like it can function = see above.

There are consequences on my email accounts too. I get errors that are apparently password-related, but I think memory is the real issue because I had the same problem occasionally when some other issue caused memory drains in the system (* solved by a reboot).

My original VPS runs on an old CentOS 6, so I understand my provider's goodwill to orient me to an OS that will not be in an end-of-life situation again in a couple of years.

But I'm afraid that trying to fix a broken Apache/DA interaction will just make me waste time.

Any suggestions?

Thanks in advance.
 
If you still want to use systemd
I suggest to use AlmaLinux 8

If you want to use ubuntu, Please use Debian OS


What's your OS Version ?
Could you show option.conf setting for me ?
Code:
cd /usr/local/directadmin/custombuild/
./build options

Can you simple run script html/php like "HELLO WORLD" for makesure that it's not cause by 3rd party extension
 
It rather looks like a faulty installation of apache2.

Here is what ./build options returned:

Nginx Unit: no
Apache: 2.4.48
mod_ruid2: no
ModSecurity: no
htscanner: no
Dovecot: 2.3.14
Dovecot configuration: yes
AWstats: no
Exim: 4.94.2
exim.conf update: yes, release 4.5
BlockCracking: no
Easy Spam Fighter: no
SpamAssassin: no
ClamAV: 0.103.2
MySQL: 5.7.33
MySQL backup: no
PHP (default): 7.4 as php-fpm
phpMyAdmin: 5.1.1-all-languages
ProFTPD: no
Pure-FTPd: 1.0.49
RoundCube webmail: 1.4.11
Replace "php.ini" with './build all' and './build php_ini': no
Cron for notifications and (or) updates: yes
Cron frequency: daily
Run "clean" every time: yes
Run "clean_old_webapps" every time: yes
Run "clean_old_tarballs" every time: yes
Show texts in bold: yes
SquirrelMail: no
Zend Guard Loader: no
ionCube loader: 10.4.5
Suhosin: no


Can it be related to a mismatch between hostname and servername? I have just noticed that systemctl status apache2 returns a hostname that should have been updated ( = not the one I have in the DA profile). I am searching exactly where to fix this.
 
Ok look like it relate to OS Limits

could you try increase limit from service eg.

Code:
systemctl set-property apache2.service TasksMax=infinity

Im not ubuntu user, I can't help any more

but I can point it to relate to "ulimit" -> npoc { soft, hard }
 
I tried the command but it does not seem to be working.

If TaskMax is in a text file ( .conf ? which one/where? ) I can edit it manually.
 
This is what it returns:

Type=forking
Restart=on-abort
NotifyAccess=none
RestartUSec=100ms
TimeoutStartUSec=1min 30s
TimeoutStopUSec=1min 30s
TimeoutAbortUSec=1min 30s
RuntimeMaxUSec=infinity
WatchdogUSec=0
WatchdogTimestampMonotonic=0
RootDirectoryStartOnly=no
RemainAfterExit=no
GuessMainPID=yes
MainPID=0
ControlPID=0
FileDescriptorStoreMax=0
NFileDescriptorStore=0
StatusErrno=0
Result=success
ReloadResult=success
CleanResult=success
UID=[not set]
GID=[not set]
lines 1-23...skipping...
Type=forking
Restart=on-abort
NotifyAccess=none
RestartUSec=100ms
TimeoutStartUSec=1min 30s
TimeoutStopUSec=1min 30s
TimeoutAbortUSec=1min 30s
RuntimeMaxUSec=infinity
WatchdogUSec=0
WatchdogTimestampMonotonic=0
RootDirectoryStartOnly=no
RemainAfterExit=no
GuessMainPID=yes
MainPID=0
ControlPID=0
FileDescriptorStoreMax=0
NFileDescriptorStore=0
StatusErrno=0
Result=success
ReloadResult=success
CleanResult=success
UID=[not set]
GID=[not set]
NRestarts=0
OOMPolicy=stop
ExecMainStartTimestampMonotonic=0
ExecMainExitTimestampMonotonic=0
ExecMainPID=0
ExecMainCode=0
ExecMainStatus=0
ExecStart={ path=/usr/sbin/apachectl ; argv[]=/usr/sbin/apachectl start ; ignore_errors=no ; start_time=[Wed 2021-06-09 09:38:11 UTC] ; >
ExecStartEx={ path=/usr/sbin/apachectl ; argv[]=/usr/sbin/apachectl start ; flags= ; start_time=[Wed 2021-06-09 09:38:11 UTC] ; stop_tim>
ExecReload={ path=/usr/sbin/apachectl ; argv[]=/usr/sbin/apachectl graceful ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pi>
ExecReloadEx={ path=/usr/sbin/apachectl ; argv[]=/usr/sbin/apachectl graceful ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; co>
ExecStop={ path=/usr/sbin/apachectl ; argv[]=/usr/sbin/apachectl stop ; ignore_errors=no ; start_time=[Wed 2021-06-09 09:38:12 UTC] ; st>
ExecStopEx={ path=/usr/sbin/apachectl ; argv[]=/usr/sbin/apachectl stop ; flags= ; start_time=[Wed 2021-06-09 09:38:12 UTC] ; stop_time=>
Slice=system.slice
lines 1-37
 
There is more info from systemctl status apache2:

(I substitute "myserver" for the actual domain)

● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system.control/apache2.service.d
└─50-TasksMax.conf
Active: inactive (dead) since Wed 2021-06-09 10:49:57 UTC; 18s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 22980 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Process: 22983 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)

Mar 29 17:13:15 replace.myserver.org systemd[1]: apache2.service: Failed with result 'signal'.
Mar 29 17:13:16 replace.myserver.org systemd[1]: apache2.service: Scheduled restart job, restart counter is at 1.
Mar 29 17:13:16 replace.myserver.org systemd[1]: Stopped The Apache HTTP Server.
Mar 29 17:13:16 replace.myserver.org systemd[1]: Starting The Apache HTTP Server...
Mar 29 17:13:16 replace.myserver.org apachectl[44732]: /usr/sbin/apachectl: line 174: /usr/sbin/apache2: Permission denied
Mar 29 17:13:16 replace.myserver.org apachectl[44724]: Action 'start' failed.
Mar 29 17:13:16 replace.myserver.org apachectl[44724]: The Apache error log may have more information.
Mar 29 17:13:16 replace.myserver.org systemd[1]: apache2.service: Control process exited, code=exited, status=126/n/a
Mar 29 17:13:16 replace.myserver.org systemd[1]: apache2.service: Failed with result 'exit-code'.
Mar 29 17:13:16 replace.myserver.org systemd[1]: Failed to start The Apache HTTP Server.
~
~


There is a "permission denied" that prevents Apache from starting (** although it does not show stopped in DA service monitor).

"replace" should not be there, it's a leftover from a swap between two VPS , "server" and "replace" - where "server" is the hostname set in DA.

I am not sure if it contributes to the general error, but I have not found yet where I can change it (into "server").
 
set direct it into "apache2.service" file on section "[Service]"
 
I have more than one "apache2.service" file on the system.

Dummy question: what about reinstalling (compiling) Apache from custombuild?
 
@SmaragdnaDolina
You not need installing any service, DA will take care for you

first let remove installing from apt
Code:
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
sudo apt-get autoremove
method remove you can find it on google,

and goto Custombuild 2.0 ( FROM Directadmin GUI )
you can find tool their
 
Thanks, this is what I meant. I can access Custombuild from DA.

I missed the instructions on how to remove the present version that seems to be broken somewhere (probably because in swapping to VPS and two linceses something got messed up).

Will I need to reinstall my user.backup and admin.backup files? They are already on the server so it is not a major problem.
 
It changed nothing.

Even trying twice did not change in the least the type of error that I am getting.

I'm afraid there could be "ghost" files/processes left over by a clumsy swap between two IPs and two DA licences, with two server names (server.mydomain.org and replace.mydomain.org)

"replace" is still there somewhere, it shows when I type systemctl status apache2 , i.e. the response comes form replace.mydomain.org and not from my host name server.mydomain.com

Perhaps it doesn't have anything to do with it, but I suspect id does.
 
When you installed your server was it blank? The server must not have anything installed. You should not install a LAMP stack or anything.

It looks like you installed apache through apt. Did you install other things like php or mysql with apt? OR did the Server provider install stuff like this for you?
 
There is more, but before flooding the forum I have a simple question (* a silly one perhaps, but I am only an end user = can move around a server and do some minor changes, but I lack real knowledge of Unix systems):
Sorry I just read this.. If you are not a Sysadmin you need to get your Host to help you. Did they install Directadmin for you?
 
Yes, the ISP created a new VPS and made a clean install of Ubuntu and DA (plus the accompanying PHP, MySQL and other stuff).

I made a backup of the admin and users from the original VPS, uploaded and restored the files on the new VPS.

The files and file structure are there but I guess that swapping IPS/ServerNames/DA licenses must have left something trailing.

Now, I can simply ask the ISP to erase the whole thing and reinstall UBUNTU+DA from 0.

But I am migrating from a CentOS 6 box, so I wonder if THAT might have caused some incompatibilities.

In this case, not even a new clean install would solve the problem. I would bump into the same errors all over again.

Has anyone restored admin/users backups from a DA installation on CentOS and got I functioning on Ubuntu (Debian)?
 
CentOS 6 box, so I wonder if THAT might have caused some incompatibilities.
Was the old box on the old deprecated CustomBuild version 1? The new supported version of CustomBuild is version 2
Has anyone restored admin/users backups from a DA installation on CentOS and got I functioning on Ubuntu (Debian)?
On Debian yes. I dont use Ubuntu.
Ubuntu and DA
They would only need to install the os and DA. DA installs all the items you need.

No need to install
plus the accompanying PHP, MySQL and other stuff


I sounds to me they installed a LAMP stack and DA which would break everything.
 
Hm, if I said that I know what a LAMP stack is I would lie ;)

I do need both PHP and MySQL because I have WP sites. I also use phpMyAdmin from time to time to check some details or make minor changes to the databases. Let's say that I like to do a little self-learning so I started this VPS several years ago to have root access and experiment and learn.

Anyway.... the migration story started a few weeks ago obviously because of CentOS approaching end of life.

I am not sure why the ISP installed Ubuntu and not simply Debian. I don't really know either. As I said, I can move around. I can do some installs and some customizations, sometimes manage to solve some little problem by googling around and finding the answers. But it is little more than a hobby at that level.

Here I definitely have the impression that the solution is to erase the new box completely and do a nice, simple, clean install. Trying to fix a broken system that was probably badly installed from the start is just a waste of time.

I have root access and SSH, and can use command line (Putty and similar clients), plus SFTP with WinSCP that spares me a lot of time.

I have the DA backup files for admin + users (just five pieces, so it is not a long or complicated job to upload them and restore them once more).

Would it be too complicated for such a limited user to sweep the VPS clean and reinstall OS + DA?
 
Here I definitely have the impression that the solution is to erase the new box completely and do a nice, simple, clean install. Trying to fix a broken system that was probably badly installed from the start is just a waste of time.
True. Just be sure you have good valid backups.
Would it be too complicated for such a limited user to sweep the VPS clean and reinstall OS + DA?
Not sure if you have a reinstall button or not. If they messed it up you might need them to fix it.
the migration story started a few weeks ago
It only takes 4-6 hours to rebuild the server. Depending on speed and network.
I have the DA backup files for admin + users
I hope you have it on your pc and in multiple places.
 
Back
Top