Tag Info

Hot answers tagged

7

yum install pcre-devel . You need the Perl-compatible regular expression library development header files You mention Ubuntu, might as well use apt-get install libpcre3-dev


6

Instead of removing APC, which will cause a massive performance hit, and effectively shoot yourself in the foot.. Try this: in /etc/php5/conf.d/apc.ini: extension=apc.so apc.shm_size=128M apc.shm_segments=1 apc.max_file_size=5M apc.num_files_hint=10000 apc.slam_defense = 0 apc.write_lock=1 You can increase apc.shm_size to a value bigger than 128, say 512 ...


5

Do I see it correctly that the fragmentation happens because the cache is used as an user cache too? No, fragmentation can happen when a file's opcode cache size has changed, and it won't fit into the 'slice' it occupied before - under the hood it's a bit more complicated, but that's the gist. Why does the fragmentation bar tell me 100% of only ...


4

APC (advanced php cache) works with PHP, not Nginx. You may know from phpinfo script, that apc extension is used; specifically, save this code as a .php file and view it through the web: <?php phpinfo(); ?>


4

Found it.. It was because of apc.mmap_file_mask set into "straight file-backed mmap" like said oficial APC doc. Since server setup is multithreaded and apc was stored in fysical file, it was stucking by the reason of locked file. Its very important to set it into shared memory. So now my apc.ini is: apc.gc_ttl="600" apc.cache_by_default="1" apc.filters = ...


4

Cached variables: 3562 ( 14.3 MBytes) This is what's causing your fragmentation. GC is cleaning them up and chances are they're getting placed in a new 'slice' when they're regenerated. You could try to up the GC TTL on user variables - but if the code for your APC usage is manually handling the TTL's that may be a part of the problem. 3500+ vars is ...


4

After switching every apc_store call with apc_add the problem with 'zombie' memory disappeared. Probably has something to do with a race condition with apc_fetch and apc_store as discussed on http://notmysock.org/blog/php/user-cache-timebomb.html. It's advised to use apc_add instead, especially these calls are user generated.


4

Since the leading cause seemed to be journaling, that would have been my next step. In order to remove journaling, however, I would need to attach the EBS volume to another instance. I decided to test the procedure out using a (day old) snapshot, however, before removing journaling, I re-ran the 10 minute iotop test (on the test instance). To my surprise, I ...


4

600 is not low for apc.gc_ttl and 3600 is actually the default value, you are right that it will vary on different installations, I have mine set to 600 as well.


3

apc is being displayed rather than interpreted. The vhost it resides on is probably not configured to interpret PHP files. Fix your vhost configuration (make sure the PHP module is loaded or the CGI is configured, and the appropriate AddType directive for PHP files has been added to your Apache configuration. (Instructions on how to do both of these items ...


3

Have you tried removing php53u? A simple: yum remove php53u Followed by: yum install php54 Should be doing the trick for you. If it does not, then you can try removing the php53u package(s) using the 'rpm' tool, leaving dependencies intact, but first check the list of packages installed so you can later re-install them from the new php54 repository: ...


3

apc acts as PHP module, wnile nginx is webserver and working with php via cgi interface. Shortly, web server configuration isn't an easy task and platform to choose depends on maany maany things. 10k connections - what does it mean, 10k parallel downloads? If video is delivered as files for same server - should be no problem with apache. better think about ...


3

We can see that your instance is running very low on memory, and is actually swapping. This is disk I/O for which you'll get billed, and also causes your site to run slower. Free up some memory by stopping unnecessary processes and tuning your web server to run fewer workers (e.g. Apache or php-fpm).


3

This message comes from nginx — apparently it decided to serve the request by returning a static file, but that file is not present. The cache in question is on the PHP application level, because the request URL path starts with /cache/ — it is not some kind of internal cache in nginx or APC. Possible causes: Maybe the request should have been passed to a ...


3

The error message says No such file or directory. And you say that the directory doesn't exist. So create the directory.


3

You don't list us the PHP modules. You most likely have something like PHP Accelerator, XCache or similar in place, a front-end cache such as Varnish caching stuff or some other black magic you won't reveal us. For the caches such as XCache, see their manual how to operate from this. For the front-end caches such as Varnish, see their manual. Other than ...


3

You gave the APC cache 2GB of RAM, but your VPS only has 2GB of RAM! Therefore the system must swap in order to do anything at all. To resolve the problem, reduce the size of the APC cache, or add more RAM.


3

Did you add: extension=apc.so to your php.ini file and restart your web server afterwards?


3

If this does not cause visible errors on the site, it must happen so early during the apache child process creation that no request has been transferred to the child before the error. Googleing for the error message suggests (http://www.litespeedtech.com/support/forum/showthread.php?t=4242) that your APC configuration is incorrect and you should check ...


3

Have you tried APC.php on the active web server? if you are using SHM and not MMAP that could explain this. The filemask simply allows it to save the ap file with random digits as per your specification to a particular location. You can even send it to /dev/zero as per a blog post here http://www.nigeldunn.com/2011/05/02/unable-to-allocate-memory-pool/ Here ...


3

are you the only user on the server? Do you host for other people/accounts? Can people upload php scripts to be run on your server? If the answer any of the above is Yes, then using something SuPHP is recommended, since it offers an extra layer of protection by forcing it to run as the user, as opposed to the user the webserver runs as. If you remove ...


2

It appears that your VPS was preinstalled with various scripts which are useful for providing shared web hosting services. Among these are cPanel and suPHP. While these can be convenient to use, if you aren't actually providing shared web hosting and you're the only person using the machine, then they're mostly redundant and unnecessary. SuPHP, in ...


2

I really don't see a problem with using FastCGI here. I'll explain: APC is needed for sites with high frequency of hits and not needed at all for sites that get hits occasionally. So, concerning memory efficiency: you have several sites on your server, some of them popular and some of them not. You have pool of FastCGI proccesses for each site and PHP ...


2

You need to wait for it to turn up in the official Ubuntu repository, or install PEAR and use PECL/PEAR to install APC but I don't know if that will work for you on Ubuntu Assuming you have PEAR/PECL installed (and any other necessary dependencies), this should install APC from that repository, which may be at a higher version than the Ubuntu package. It ...


2

Since you are running a released version of ubuntu, you shouldn't expect newer upstream versions of software to be released for that version of ubuntu, only security patches to older versions. You can see here that 3.1.10 has been released for a newer release of ubuntu. You can try backporting that version. To backport, first you need to add a deb-src line ...


2

Ubuntu Packages says is exists, but it's in universe. Have you enabled that repo?


2

When using APC one of the things you need to ask yourself how much memory will be allocated to APC. apc.shm_size controls how much memory will be allocated. All my setups are configured to use 30M (I believe 32M is the default option). Also, check your "cache full count" to ensure APC is actually working. This shows how often the cache is at maximum ...


2

Either remove /opt/php5/etc/conf.d/apc.ini or comment all lines in it with a ;. Don't forget to restart your webserver afterwards. Also check '/etc//php5/apache2/php.ini' for 'extension=apc.so' to outcomment. If you still have the sources around, you could try to do a make uninstall afterwards. I don't know if the makefile contains this target.


2

Memory problems usually happen for one of two reasons. 1.Repeated loading of something in a loop without clearing memory from the previous loop 2.Loading something too large You can try the following: 1.Try to clear apc cache by restarting apache service or use apc.php file to clear opcode cache 2.Increase your memory limit from php.ini memory_limit ...


2

The best solution for installing APC on Debian systems is to use the dot.deb packages. The official Debian APC package is still using version 3.0.19-2 which is very outdated. Using the dot.deb package will also allow you to use the latest version of PHP. Instructions: For the main Dotdeb repository, depending on your distribution (lenny/oldstable or ...



Only top voted, non community-wiki answers of a minimum length are eligible