Allocate more resource for a virtual server

10 posts / 0 new
Last post
#1 Fri, 07/06/2012 - 07:30
hothandao

Allocate more resource for a virtual server

Hello,

I have got in troubles with allocating more resource for PHP website of a virtual server.

I have a script (I think it needs a lot of resource). When I executing it, whole website are inaccessible with 500 Internal Error: Premature end of script headers. PHPMYADMIN installed within that Virtual Server was still working.

In fact, when that script is executed, RAM & CPU are about 75% available && Websites from other Virtual Server worked properly.

I think I need allocate more resource to that Virtual Server: PHP: Maximum memory allocation: -> 1024MB

Apache Virtual Server: CPU resource limit: 3000 Process Limit: 3000 Memory resource limit: 1024

However, Nothing worked.

Please let me know how I can track and solve problems.

Thanks,

Fri, 07/06/2012 - 08:10
andreychek

Howdy,

What error is it you're seeing in your Apache logs for that particular domain -- that's available in $HOME/logs/error_log.

That may offer some additional insight into what is going on there.

-Eric

Fri, 07/06/2012 - 09:21
hothandao

Here are the log's content:

[Fri Jul 06 18:43:30 2012] [error] [client 117.xx.xx.xxx] Premature end of script headers: admin.php, referer: http://domain.com/wp-admin/admin.php?page=autor&rvid=4949

[Fri Jul 06 18:43:30 2012] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.

[Fri Jul 06 18:43:30 2012] [error] [client 117.xx.xx.xxx] Premature end of script headers: index.php, referer: http://domain.com/

admin.php?page=autor&rvid=4949 is the script I would like to run (A wordpress plugin)

Fri, 07/06/2012 - 10:00
andreychek

Howdy,

Hmm, those errors are unfortunately a bit vague... though I don't see anything that suggests a resource issue.

However, one thing you could try is to go into Server Configuration -> Website Options, and to set the PHP Execution Mode to "CGI".

The CGI mode can sometimes produce additional (or more helpful) error messages.

-Eric

Fri, 07/06/2012 - 10:31
hothandao

Andrey,

Here is output:

[Fri Jul 06 22:32:20 2012] [error] [client 117.x.xx.xx] Premature end of script headers: php5.cgi, referer: http://domain.com/wp-admin/admin.php?page=autor&rvid=4949&autoRun=1

[Fri Jul 06 22:32:20 2012] [warn] [client 117.x.xx.xx] Timeout waiting for output from CGI script /home/timeik/cgi-bin/php5.cgi, referer: http://domain.com/wp-admin/admin.php?page=autor&rvid=4949&autoRun=1

[Fri Jul 06 22:32:24 2012] [warn] [client 117.6.15.211] Timeout waiting for output from CGI script /home/timeik/cgi-bin/php5.cgi, referer: http://domain.com/

Fri, 07/06/2012 - 11:00
andreychek

Hmm, it looks like you may be seeing a timeout issue... that the script is just taking too long to run.

You could try going into Server Configuration -> Website Options, and increase the timeout there.

-Eric

Fri, 07/06/2012 - 11:05
hothandao

Andrey,

Increase time out can solve ERROR only: Only when that script executed done, then the website can be accessible next. Server's resources are still A LOT (1.5GB RAM + 75% CPU) available during script execution.

However, my target is for running the whole website, simultaneously with the script.

Is there any more step to dig into the problem?

Thanks,

Sat, 07/07/2012 - 06:13
hothandao

I am still stuck on this. Please help me.

Thanks

Sun, 07/08/2012 - 09:55
hothandao

I have found new information for this issue:

I have added three more subdomain as root domain's alias. Now, if I access that script through a domain, the whole website started with that subdomain went inaccessible. Root domain & other subdomains are now accessible.

Wed, 07/11/2012 - 18:14
hothandao

Hi,

I still cannot make use of most resource from server for this virtual server. Please help me how to solve it.

Thanks,

Topic locked