Unable to create addon domain: cPanel warnings

Tim Hysniu

Member
Nov 10, 2015
9
0
1
Vancouver
cPanel Access Level
Root Administrator
Hi there,

I can't recall making any updates to cPanel or WHM. One day I started getting about 80 warnings when I try to create a new addon domain. When I look at the logs the same warnings produced the log below about 80 times:

I researched this error and tweaked some settings in WHM but I wasn't able to fix anything.
Can someone please let me know how I can fix it?

[2015-11-05 23:00:53 +0000] warn [cpanel] Cpanel::Wrap::send_cpwrapd_request error: namespace=[Cpanel] module=[domain] function=[ADD]: set error in context subdomain: statusmsg=[The adminbin
“domain” in the “Cpanel” namespace call to function “ADD” ended prematurely: The subprocess reported error 29 when it ended.] at /usr/local/cpanel/Cpanel/Wrap.pm line 126, <$socket> line 1.
Cpanel::Wrap::send_cpwrapd_request("namespace", "Cpanel", "module", "domain", "function", "ADD", "data", "testnovember mydomain.com 1 /home/wizard/public"..., "action",
...) called at /usr/local/cpanel/Cpanel/AdminBin.pm line 105
Cpanel::AdminBin::adminrun("domain", "ADD", "testnovember", "mydomain.com", 1, "/home/wizard/public_html/testnovember") called at /usr/local/cpanel/Cpanel/SubDomain.pm
line 314
Cpanel::SubDomain::_addsubdomain("testnovember", "mydomain.com", 1, 0, "public_html/testnovember") called at /usr/local/cpanel/Cpanel/SubDomain.pm line 183
Cpanel::SubDomain::addsubdomain("testnovember", "mydomain.com", 1, 0, "public_html/testnovember") called at cpanel.pl line 3069
main::dosubdomain("addsubdomain", ARRAY(0x5dcb908)) called at cpanel.pl line 2069
eval {...} called at cpanel.pl line 2069
main::_api1(__CPANEL_HIDDEN__, __CPANEL_HIDDEN__, __CPANEL_HIDDEN__..., __CPANEL_HIDDEN__, ARRAY(0x5dcb908), __CPANEL_HIDDEN__, undef, undef) called at cpanel.pl line 1728
main::real_exectag("<cpanel SubDomain=\"addsubdomain(\$RAW_FORM{'domain'},\$RAW_FORM"...) called at cpanel.pl line 4105
main::dotag_finished_headers(0) called at cpanel.pl line 3964
main::cpanel_parseblock("<cpanel setvar=\"headerimg=../images/topsubdomains.gif\">\x{a}<cpan"...) called at cpanel.pl line 3879
main::y(GLOB(0x54ea9e8)) called at cpanel.pl line 5220
main::run_standard_mode() called at cpanel.pl line 887
[2015-11-05 23:00:53 +0000] warn [SubDomain::addsubdomain] Encountered error in SubDomain::addsubdomain: [A warning occurred while processing this directive.]
[A warning occurred while processing this directive.]
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

Is any additional information about the error message found in /usr/local/cpanel/logs/error_log when attempting to add the domain name? Does this happen for any other domain name, or just the one you are adding? Does the domain name you are adding resolve to the server?

Thank you.
 

Tim Hysniu

Member
Nov 10, 2015
9
0
1
Vancouver
cPanel Access Level
Root Administrator
Hi there,

It is happening for any domain.
It is happening regardless whether the domain/subdomain is pointing to this server or not.

I am seeing some other memory exhausted errors. I tried increasing cPanel memory to 1024 and unlimited for testing. This didn't fix anything.

[2015-11-12 16:34:24 -0800] warn [Internal Warning while parsing [stdin] 26646] The system failed to fork a new process because of an error: Cannot allocate memory at /usr/local/cpanel/Cpanel/BandwidthDB/ImportRRD/Steps.pm line 183.
at /usr/local/cpanel/Cpanel/BandwidthDB/ImportRRD/Steps.pm line 183.
Cpanel::BandwidthDB::ImportRRD::Steps::__ANON__(Cpanel::Exception::IO::ForkError=HASH(0x58bcb530)) called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 103
Try::Tiny::try(CODE(0x5aba8b58), Try::Tiny::Catch=REF(0x59e826a8)) called at /usr/local/cpanel/Cpanel/BandwidthDB/ImportRRD/Steps.pm line 184


Any thoughts?

Thanks,
Tim
 

Tim Hysniu

Member
Nov 10, 2015
9
0
1
Vancouver
cPanel Access Level
Root Administrator
I believe I found the reason why this error is occurring.

I am currently dealing with a setup where there are many domains owned by a single cPanel user. My assumption is that the htttrpd.conf has become so large that it's taking more memory to parse it?

I just tried creating another cPanel user with WHM and tried creating an addon domain with this new user. It worked!

Do you know of a way I can increase memory needed by cPanel to parse this file?
Max cPanel process memory in Tweak Settings didn't really do anything.

Thanks,
Tim
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

How much RAM is installed on this system? Is this a VPS or a dedicated server?

Thank you.
 

Tim Hysniu

Member
Nov 10, 2015
9
0
1
Vancouver
cPanel Access Level
Root Administrator
Hi there,

Looks like we have 4GB. This is a dedicated server.
Do you think this is low?

Thanks,
Tim

# free -m
total used free shared buffers cached
Mem: 3832 3365 467 0 384 2030
-/+ buffers/cache: 949 2882
Swap: 0 0 0
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
I am currently dealing with a setup where there are many domains owned by a single cPanel user.
How many domain names are added to the account? Is the cPanel memory limit as configured in "WHM >> Tweak Settings" set to unlimited?

Thank you.
 

Tim Hysniu

Member
Nov 10, 2015
9
0
1
Vancouver
cPanel Access Level
Root Administrator
Hi Michael,

Thanks for your help on this. There are 450 domains in this account.
I have set memory limit to unlimited and tried restarting few services as well (httpd, mysqld). This didn't help.

Thanks,
Tim
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
You can rebuild the Apache configuration file via:

Code:
/scripts/rebuildhttpdconf
Also, you can enable "Conserve memory" under the "System" tab in "WHM >> Tweak Settings" to see if that helps.

Thank you.
 

Tim Hysniu

Member
Nov 10, 2015
9
0
1
Vancouver
cPanel Access Level
Root Administrator
Thank you for your support. I tried rebuilding httpd.conf using script mentioned which worked fine (no memory issues reported here). I enabled conserve memory and set max cpanel process memory to unlimited. No luck so far.

I have asked the provider to double the memory in the meantime.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Could you verify if the issue persists after adding the additional memory?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
I am happy to see the issue is now resolved. Thank you for updating us with the outcome.