Skip to main content

Posts

Showing posts with the label php world

PHP-FPM tuning: Using ‘pm static’ for max performance best php training trivandrum

PHP-FPM tuning: Using ‘pm static’ for max performance Lets take a very quick look at how best to setup PHP-FPM for high throughput, low latency and a more stable use of CPU and memory. By default, most setups have PHP-FPM’s PM (process manager) string set to  dynamic  and there’s also the common advice to use  ondemand  if you suffer from available memory issues. However, lets compare the two management options based on php.net’s documentation and also compare my favorite for high traffic setups…  static  pm: pm = dynamic  – the number of child processes is set dynamically based on the following directives:  pm.max_children, pm.start_servers,pm.min_spare_servers, pm.max_spare_servers . pm = ondemand  – the processes spawn on demand (when requested, as opposed to dynamic, where pm.start_servers are started when the service is started. pm = static  – the number of child processes is fixed by...

How does the PHP Realpath Cache work and how to configure it? best php training trivandrum

How does the PHP Realpath Cache work and how to configure it? The realpath cache in PHP is often overlooked and its exact workings are a bit of a mystery to many developers, fueled by a lot of explanations on the web that are just plain wrong. How exactly is the realpath cache working and at which level of PHP? There has been some buzz around realpath cache in the last weeks, so it is a hot topic to look into. First, The PHP 7.2 changelogs contain a small note about the realpath cache size, raising the question what about the previous default in pre 7.2 deployments and if you should look into changing it: realpath_cache_size: Set to 4096k by default The previous default was just 16k, a 256x increase is massive! Second, the blog post " Is it all Opcache's fault? " on the facile.it Engineering blog identifies the realpath cache as a potential problem during symlink deployments. Knowing about this issue is important when building your own deploy strategy. ...

Pretty print curl -i best php training trivandrum soddisfare

 working with APIs is  curl  and in particular, I like using the  -I  switch to view the status line and headers too: This generates an output that looks like this: 1 2 3 4 5 6 7 8 9 10 $ curl -i https://api.joind.in HTTP/1.1 200 OK Date: Wed, 04 Oct 2017 09:51:46 GMT Server: Apache X-Powered-By: PHP/5.6.4 Access-Control-Allow-Origin: * Content-Length: 363 Content-Type: application/json; charset=utf8   {"events":"https:\/\/api.joind.in\/v2.1\/events","hot-events":"https:\/\/api.joind.in\/v2.1\/events?filter=hot","upcoming-events":"https:\/\/api.joind.in\/v2.1\/events?filter=upcoming","past-events":"https:\/\/api.joind.in\/v2.1\/events?filter=past","open-cfps":"https:\/\/api.joind.in\/v2.1\/events?filter=cfp","docs":"http:\/\/joindin.github.io\/joindin-api\/"} What I would like to do is pre...