0

I'm running into a rather nasty issue, and hope that anyone here can help me with a possible solution as I'm pretty much brickwalling right now.

The situation:

  • I have an OpenVZ VPS that is configured with VSwap
  • My VPS provider has confirmed there is still plenty of host cpu/ram/etc available on the node
  • I've done a textbook LEMP install, tried both CentOS 5 and 6.3 with the same results
  • php-fpm runs OK with phpinfo(); and gives the proper output, so nginx and php itself seem to be doing just fine
  • installing phpMyAdmin to manage the database, I ran into my problem: First time around, it would give a phpMyAdmin error, with the dreaded Bad gateway 502 upon reload. The log file for php-fpm shows a SIGSEGV
  • php-fpm won't recover from this, unless I manually restart the service
  • Looking at extensions and disabling them one by one, it seems the Segfault is caused by APC, because disabling it removed this. This makes me think it's a memory management issue somewhere with shared memory.
  • Further suspicions about the previous point is the fact that a more traditional VPS on OpenVZ with the same provider (using burst/beancounters) with the exact same setup runs fine.
  • Disabling APC and other extensions, leaving just the required ones, still doesn't give me the phpMyAdmin, and just gives me an error to check the php configuration and that I should check the logs.
  • The logs, however, do not give me any information.
  • Nginx logs just tell me: 797#0: *20 recv() failed (104: Connection reset by peer) while reading response header from upstream
  • PHP-FPM error logs do not give anything at all (no logging).

Does this mean VSwap is bad? Am I doing something wrong? once again I've done a textbook install using "if not true then false" guides on 2 versions of CentOS, and one VPS runs fine (no VSwap) while the other does not (VSwap), with really no difference otherwise as far as I can tell.

Edit: I've tried different versions and architecture of client O.S. (CentOS 5.* and 6.*, x86 and x64) and different versions of all LEMP components and phpMySQL and it makes no difference. On the plus side, what I needed phpMySQL for can possibly be done with other software and the fora I need a database management tool for running on phpBB3 seem to do just fine. But it's still weird and aberrant behavior.

1 Answers1

0

How important is the VSwap? I'm guessing your on CentOS 6. You could ask the host to remove the VSwap from your Container for a bit and reinstall see if that works. Otherwise you could ask the host if they have any other nodes they could put you on or swap host?

Jamie
  • 214
  • 1
  • 2
  • 12
  • Is it possible to remove VSwap from individual containers? If so, that would be something to suggest to them. The VSwap is important because I run multithreaded apps that beancounters go mad over (it counts VIRT and not RSS which makes me "run out of memory" while I'm not) –  Feb 21 '13 at 09:15
  • I could work around not having VSwap by reconfiguring MySQL, and since I'm not using Apache that should be fine. So, VSwap isn't all that important in the end. –  Feb 21 '13 at 11:36
  • You could always ask them to get rid of your VSwap and get a normal swap just like some other hosts. That would possibly work. – Jamie Feb 21 '13 at 16:42
  • Question remains if it's possible to disable VSwap for individual containers on one host. Do you know, @jamie? I know nothing about OpenVZ from a management point of view (I'm more of a VMWare person myself). –  Feb 21 '13 at 23:07
  • Looking at SolusVM it is possible. Through going to the individual container --> Resources --> and unticking "Enable VSwap". Not sure about inside of OpenVZ as it looks like it disables the whole swap file vzctl set "cid" --ram 512M --swap 1G --save – Jamie Feb 23 '13 at 10:28
  • Looks like I'll have to see what my host can do - I can't really lose half my ram by having no swap if they can't re-enable burst/beancounters. Thanks for the input! –  Feb 24 '13 at 12:07
  • As a VPS provider, yes you can disable Vswap, and yes you could probably get them to adjust your VPS to have more RAM, but they'll probably say no. Not really an answer, but move providers :) – Joshua D'Alton Mar 22 '13 at 14:39