Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Mar 8 '13 at 13:42

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer 1

up vote 0 down vote accepted

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?

share|improve this answer
    
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) –  Mark Straver Feb 21 '13 at 9: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. –  Mark Straver 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 H 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). –  Mark Straver 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 H Feb 23 '13 at 10:28
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.