2

Im setting up toran proxy to use with our private packages. Im mostly there and testing.

I have Toran Proxy set up on a basic lamp stack on digital ocean and its is configured correctly (from what i know). But when running composer install (on my local dev set up, OSX default apache etc) its saying the package I am requesting isn't available due to a 500 Internal Server error.

Composer\Downloader\TransportException]
The "https://url.com/repo/packagist/p/lewis/bettercms.json" file could
not be downloaded (HTTP/1.0 500 Internal Server Error)

So I checked the apache logs on the server and the fatal error is due to the memory being exhausted.

I have upped it to 2G in the php.ini and restarted apache but still no luck!

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /var/www/toran.lewisecommerce.net/src/Toran/ProxyBundle/Service/Proxy.php on line 470

Does anyone have any experienced with setting Toran up? Have you come across any memory issues?

Ive checked php -i and grepped for memory limit which it seems to have picked up the change so im pretty sure php knows this. And I believe I have changed the correct .ini file according to phpinfo() and of course restarted apache. Still no luck.

here is a screenshot of top when under load: top

Thanks

Tom Burman
  • 947
  • 3
  • 15
  • 37
  • What setting did you change on the `php.ini` ? – Pedro Lobito Apr 25 '16 at 21:37
  • Tha ks for the reply. I have changed memory_limit – Tom Burman Apr 25 '16 at 21:38
  • Are you using a virtual server or shared hosting ? – Pedro Lobito Apr 25 '16 at 21:39
  • It's a virtual server that has 2GB memory on digital ocean – Tom Burman Apr 25 '16 at 21:39
  • You've found your problem. You vps is lacking memory because other service also use memory, run `top` on your shell to check the available memory. – Pedro Lobito Apr 25 '16 at 21:43
  • But why would toran proxy be using so much memory do you think? Seems very high! I'll check top out again in the morning but when I checked earlier when the server was at 1GB it still had about 400M free memory at the Peak of the operation – Tom Burman Apr 25 '16 at 21:45
  • It's difficult for me to tell you what's causing the me4moty issue. Try emailing toran@nelm.io and explain your problem. https://toranproxy.com/support – Pedro Lobito Apr 25 '16 at 21:51
  • `Allowed memory size of 134217728 bytes exhausted` That looks like a very big number, but in reality only is 128MB. If you think you changed the memory limit, PHP seems to not know about it. – Sven Apr 26 '16 at 01:48
  • Thanks Sven - Ive checked php -i and grepped for memory limit which it seems to have picked up. And I believe I have changed the correct .ini file according to phpinfo() and of course restarted apache. Still no luck – Tom Burman Apr 26 '16 at 07:31
  • The command to identify which INI file is used on the command line is `php -i | grep ini` - this should show you basically any output dealing with ini files and more. – Sven Apr 26 '16 at 20:56

2 Answers2

0

It's a virtual server that has 2GB memory on digital ocean

You vps is lacking memory because other service also use memory (mysql, mail, etc.), run top on your shell to check the available memory.

enter image description here


But why would toran proxy be using so much memory do you think? Seems very high! I'll check top out again in the morning but when I checked earlier when the server was at 1GB it still had about 400M free memory at the Peak of the operation

It's difficult for me to tell you what's causing the memory issue. Try emailing toran@nelm.io and explain your problem. https://toranproxy.com/support

Pedro Lobito
  • 94,083
  • 31
  • 258
  • 268
0

Turns out PHP was using a different .ini file from the one I was changing and believed it to be. Simply changed the PHP value in the correct .ini file.

For Digital ocean this is /etc/php5/apache2/php.ini not the CLI one!

Tom Burman
  • 947
  • 3
  • 15
  • 37