I am running a Dancer (v1.3202) app with Starman (v0.4014) and ngynx as a front end proxy. I am noticing a huge latency spike in my load balancer every couple of hours and wonder if it's the workers reaching their request limit and restarting. The latency goes from 30ms average to 1000ms or more. I checked the MongoDB and there are no long running queries. What does the --max-requests actually do regarding the workers and what happens when a worker reaches this limit?
What is the optimal --max-requests setting for Starman?
766 Views Asked by MadHacker At
1
There are 1 best solutions below
Related Questions in PERL
- Perl Command Line Interpreter crashing on exit
- Perl Regex: Merge multiple one-character substrings
- Syntax error in Perl open
- Need help in understanding perl tr command with /d
- Referencing a Schema's table batch/perl
- Retrieving filtered list of files using template toolkit
- “Badly placed ()'s” error when running loc command
- getting google contacts using shuttlecloud
- Perl Module using %EXPORT_TAGS
- get all possible permutations of words in string using perl script
- Can't locate DBI.pm in @INC with Perl
- split string into several substring using indexes
- How to find strings between two specified texts
- Getting a json from a server and assigning it to a variable
- Is there anyway to plot timeline charts in excel sheets using Spreadhseet::WriteExcel module in Perl?
Related Questions in NGINX
- PHP script timeout when I use sleep()
- Convert Apache VirtualHost to nginx Server Block for Dynamic Subdomains
- Nginx not passing websocket upgrade response back to client?
- How to rewrite url to match root directory?
- How to deploy django 1.8 on Elastic Beanstalk using Docker
- How to set X-Frame-Options Allow-From in nginx correctly
- Adding custom events to nginx request handler
- Nginx 403 forbidden with php-fpm
- Changing sorting on Nginx autoindex
- Convert .htaccess to nginx, seeking working solution
- Phalcon 2.x skeleton app with modules doesn't produce 404 Not Found if path is not found
- HSTS: Should I force user to use HTTPS on load balance or web server?
- What are the possible bugs that cause slow response (sometimes but not all the time) for a websocket connection?
- MariaDB/MySQL all of a sudden crashed and won't restart
- Nginx + php5-fpm not displaying php errors but cli is showing errors
Related Questions in DANCER
- How to run a Perl Dancer Test
- How to import perl module (xml::twig) in a dancer framework
- Dancer2: fetching nested data from hash stored in YAML session
- Perl (Dancer) & Template Toolkit - looping thru hashref
- Perl Dancer and defining routes with named parameters and nested prefixes
- Can I instantiate an object in Dancer to return a value to display?
- Is there a very simple way to update a page in Perl Dancer using jQuery/AJAX?
- Using CPAN to install Dancer and dependencies
- Perl Dancer2 Authentication Password Management
- DBIx::Class Error on New and Create
- template toolkit displays unique row
- Dancer vs Catalyst [Perl Web Frameworks]
- Searching based on many-to-many relationship
- Handling sorting, tags, search, paging of a list
- Using Integrated Windows Authentication in a Perl Dancer App
Related Questions in STARMAN
- Why starman / plackup don't recommend option -r
- Configuring directory aliases in Starman (or other PSGI servers)
- Dynamic package loading under plackup with Starman
- Supervisor and perlbrew
- Starman eat all the memory with Dancer REST api
- How do I discover on what server the app.psgi process is running?
- Apache/Starman - how to implement lots of different webapps with single virtual host
- ZMQ sockets block when Starman receives HUP
- Why does SSL fail in Starman
- An explanation of the nginx/starman/dancer web stack
- How to proxy a starman request to Apache?
- How do i use Plack Authentication with Session middleware?
- uri_for includes port number on redirects
- Why use nginx with Catalyst/Plack/Starman?
- Starman and MovableType 5.2
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
What does the
--max-requestssetting do?From
starman --help:What this means is that each worker will exit after it processes that many requests. The master process will then launch a brand new worker for each worker that exits, maintaining the number of workers according to the
--workerssetting.Using
--max-requestsis usually a good thing, especially if your app isn't the only thing running on the box, becauseperl(notoriously) does not give back memory that it uses. This recycling of worker processes is the waystarmancan give memory back for other processes to use. If your app actually leaks memory, this can also help keep your app running with good performance as opposed to your app eventually consuming all the memory and needing to be killed by the OS.What is the optimal value for the
--max-requestssetting?You should leave it at its default value of
1,000unless you have a good reason to change it. If your app is the only thing running on the box and you're sure that it's not leaky, you could try using a higher value to recycle workers less often. If you know your app is leaky, you may want to use a lower value to recycle workers more often. However, generally this setting should actually have very little impact on performance.That said, recycling workers could be responsible for spurious slow requests if your workers cache stuff in memory because new workers would need to spend some time rebuilding those caches, but there could be many other possible explanations. You'll need to do some profiling to find out what's really causing the specific slowness you're seeing.