Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: Another Internal Server Error  (Read 5598 times)

Offline featurespoon

  • Newbie
  • *
  • Posts: 24
  • Karma: +5/-1
    • View Profile
Another Internal Server Error
« on: December 09, 2016, 03:20:43 AM »
I have recently started getting this Internal Server Error message coming up every time a new page is loaded in the AbanteCart control panel:

"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@xxxxxxx to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request."

I've read the earlier reports of this error, but none of the suggested solutions work for me. No error messages appear in the error log. In the host control panel I do get messages like:

[Fri Dec 09 07:44:41.692159 2016] [:error] [pid 343660] (12)Cannot allocate memory: [client a.b.c.d:55086] couldn't create child process: /opt/suphp/sbin/suphp for /home/txxxxxe/public_html/index.php, referer: hhhh://txxxxe.org.uk/index.php?rt=setting/setting&active=system&store_id=0&s=admin123&token=K6goZgEZJezJ9nKKJJd0MVniO9hhEJgY

Additionally, host control panel resource usage shows that virtual memory usage has shot up to their maximum of 1024Mb although physical memory does not go above 30Mb.   My php.ini memory maximum was put up to 1152Mb for a time (!) but this had no effect. I was still getting these orange error messages, sometimes two for a new page.

Image sizes in the resources/image directory are no more than 603kb.

I wondered whether my recent addition of a new extension may have been responsible so I uninstalled and deleted that one, plus one I had modified substantially, and moved the files away from the extensions directory.  No joy.

Can you suggest anything?

Thanks.


Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5807
  • Karma: +274/-2
    • View Profile
Re: Another Internal Server Error
« Reply #1 on: December 09, 2016, 05:56:55 AM »
I think you need contact hosting provider to get help

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2048
  • Karma: +319/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Another Internal Server Error
« Reply #2 on: December 09, 2016, 06:38:15 AM »
also you can check memory limit on page

http://YOUR_DOMAIN>COMl/index.php?rt=setting/setting/phpinfo&s=admin123&token=YOUR_TOKEN
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline featurespoon

  • Newbie
  • *
  • Posts: 24
  • Karma: +5/-1
    • View Profile
Re: Another Internal Server Error
« Reply #3 on: December 09, 2016, 04:34:37 PM »
Abalabo:
The memory_limit I have set to 384M in my little php.ini file and that is what I see in the full php_info report that you referenced (System -> Settings -> System and then PHP info button top left). From what I've seen I think this is way over the top.

Barasa:
I have contacted my hosting provider and I have given above the information that they provided. They seemed unable to help further.  It almost looks like a bug in PHP, but this has only recently started happening.  What I said was:

Looking at the last 30 days, there have been periods when (14-15, 22-25 Nov) when the virtual memory limit has been reached, but I have only experienced these error messages 'Internal Server Error' in the last day or so.

This makes me think the answer lies in the code of Abantecart which is way beyond my understanding at the moment.

Another thing I tried was to 'switch off' the Foxy template which I bought and installed some time ago and I think recently has been automatically updated. This made no difference. 

Could this possibly be the problem?
The only substantial change I made in the short time before this started happening was to change the code of the 'Royal Mail' shipping extension (extensions/default_royal_mail/storefront/model/extension/default_royal_mail.php)  and to add a new shipping extension 'Yodel' which was modelled on the 'Royal Mail' one.  Now I added that extension simply by adding the new folder 'default_yodel' with all the necessary files (which I had previously debugged in my offline copy of AbanteCart on my local machine) to the extensions folder.  I had logged out from the control panel before doing this.  My understanding was when the extensions page was brought up, Abantecart would find the new extension and add it to its internal data (this extension makes no SQL changes) and everything would be fine, and it was. The extension worked (apart from some language 'translations') and the desired extra shipping options appeared in the checkout. Soon afterwards I started getting these Internal Server Errors.

So one of these could be the suspicious culprit, right?

Ok, so I uninstalled both these extensions and deleted them using the buttons on the extensions page. I then physically moved the default_royal_mail and default_yodel folders to be under the tmp folder, out of the way. AbanteCart shouldn't see them there.  So these extensions cannot in any way be responsible for these errors. But I still get them.  Is it possible that some residual entries in the database might remain which could be throwing a spanner in the works?  (Well I found some in the dataset tables, but these seem to be recording the installing and uninstalling of the extensions. It's hard to think these could be responsible.)

Is it possible that the database has become corrupted? 

Do I have to do a complete reinstall?

Any other suggestions?   Would my sending you a verbose debug log help?

Thanks for your attention so far.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5807
  • Karma: +274/-2
    • View Profile
Re: Another Internal Server Error
« Reply #4 on: December 12, 2016, 12:51:07 AM »
Hello, featurespoon

Thank you for details.

Looking at the last 30 days, there have been periods when (14-15, 22-25 Nov) when the virtual memory limit has been reached, but I have only experienced these error messages 'Internal Server Error' in the last day or so.

This makes me think the answer lies in the code of Abantecart which is way beyond my understanding at the moment.
So if AbanteCart code not changed and work before something another changes happen, right? It is still possible that issue related to AbanteCart code but what is changed? Take a note shared hosting providers change php version, php libraries or any internal server setting without any notification to you...
So first backup everything (database and code) then try to check, optimize database tables via phpmyadmin.
Clear All AbanteCart caches.

Also check google for similar problem - issue may be related to a lot of things which make to hard to find problem from our side  :o

http://www.webhostingtalk.com/showthread.php?t=1530639
https://theshosting.com/knowledgebase/258/Cannot-allocate-memory-couldnt-create-child-process-oroptorsuphporsbinorsuphp.html

Offline featurespoon

  • Newbie
  • *
  • Posts: 24
  • Karma: +5/-1
    • View Profile
Re: Another Internal Server Error
« Reply #5 on: December 17, 2016, 10:03:13 AM »
Thanks for your reply, Basara.

Yes, I've backed up, but I don't know what you mean by optimise in phpAdmin. I can't see such an option unless you mean 'Check Tables having overhead' - which produced no response.

I wonder if the problem is associated with the Cache. Earlier on I deleted the files and folders directly when I suppose I should have used the Control Panel facility.  I could see that the cache files and folders were restored after subsequent activity. When I went in to clear the cache again using Control Panel, a lot of the text of the page was either missing or showed the key rather than the value such as text_configuration and desc_configuration. These text values are still in the language definitions in the block tool_cache, which I take to be the right block. Clicking on the button at the bottom of the page "text_clear_cache" does not seem to do anything. I'm using the cache FILE driver.
A lot of the other pages in the Control Panel are fine, showing text values rather than keys as they should. This looks like some kind of corruption and I think I'll just re-install. But of course not knowing why the corruption occurred is troubling.  Is it possible my not clearing the cache in the proper way could be responsible?  However, the Internal Server error messages were appearing before I touched the cache.

Offline featurespoon

  • Newbie
  • *
  • Posts: 24
  • Karma: +5/-1
    • View Profile
Re: Another Internal Server Error
« Reply #6 on: February 06, 2017, 08:27:16 PM »
I'd like to tell you how I resolved this issue. I in fact cleared down the website and re-installed AbanteCart. When I did so I noticed a message during the installation process which said make sure the PHP setting opcache was turned off. So I made sure that was the case.  This also required the setting zend_guard_loader to be turned off. On doing a clean install, I still got the error messages.  Therefore it was clearly a hosting issue, not Abantecart, so I thought.  By playing around with the PHP version on the Hosting Control Panel the problem went away. 

However recently the problem returned when going into the resource manager. This was after loading a large number of images. The hosting Control Panel error messages were complaining of using too much virtual memory. This was happening when going into the resource manager. Presumably at this point all the images were being cached. So I turned off caching for images: 

System -> Cache - check images and click on 'Clear Selected Cache'.

The annoying error messages have gone away, I hope for good.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 5807
  • Karma: +274/-2
    • View Profile
Re: Another Internal Server Error
« Reply #7 on: February 07, 2017, 12:17:50 AM »
Thank you, featurespoon for info  ;)

 

Powered by SMFPacks Social Login Mod