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 answers
Related Questions in PERL
- Perl Regex for converting query strings
- Cross compiling perl for Android ld.lld: error: unable to find library -lpthread
- Regexp to remove small numbers and leave large ones
- `df` command not capturing entire output in perl
- Webmin CentOS7 AWS backup errors - perl(S3::AWSAuthConnection) can't be installed
- How to ignore perm errors with Path::Tiny 'visit'? (Windows)
- Why does setting `*\` to a scalar (string) reference not result in auto printing
- Regex for deconstructing SQL where statement
- Random characters in DS record from Net::DNS:RR when calling print/string
- Perl with Selenium: cannot save the Web page with Ctrl+S
- openssl pbkdf2 and perl
- Strawberry Perl using a separate winlibs distro
- Perl / Undefined value as a HASH reference when running SNMP queries
- Timestamp with timezone: works with isql but not with DBD::Firebird
- Slurping a file ... syntax error - example from perldoc
Related Questions in NGINX
- Nginx reverse proxy with query parameters not working
- Root path analogue in uWSGI as in Uvicorn
- Keycloak: How to override Welcome Screen redirect behavior (to custom realm, instead of master realn/admin)
- nginx set up reverse proxy from subfolder to a port
- Nginx Not Correctly Redirecting Users To Custom Page
- How to connect to ssh server with domain name
- Nginx configuration file and SSL certificate errors in Docker
- Invalid Host header not being rejected by nginx
- Nginx only caches file endpoints
- How to configure Nginx for a VPS?
- Problem with changing default NGINX 404 error page
- My VPS does not accept HTTPS requests on a port other than 443
- NGINX Configuration Issue with Next.js and Strapi Project
- Openshift nginx proxy_pass not redirecting from current host to another
- Adonis.js in production : ENOENT: no such file or directory, open '/public/assets/.vite/manifest.json'
Related Questions in DANCER
- How to send serialized post with Plack::Test?
- How to `send_error` from `before` hook at dancer?
- Is there a way to allow multiple connections to Dancer2
- Mixed content & uri_for function
- Why Dancer `halt` command bypass all events?
- Why 'after' hook is not called when exception occur?
- Trying to create Dancer2 custom response
- Perl Dancer and Mason2
- Sort a hash reference by value instead of key in Template Toolkit
- How to pass a command line option in Perl Dancer App executed by plackup
- Starting web development with Perl Dancer2
- SOLVED: Where Dancer2 tutorial script is looking for css/stype.css file?
- what is the significance of 'retry' and 'every' config parameters in Dancer2::Plugin::Redis
- Perl Dancer2 default route failing
- Perl script running a periodic (main) task and providing a REST interface
Related Questions in STARMAN
- Problems with Starman workers
- FastCGI or PSGI Interface to NGINX in 2021
- Remote Debuging Perl, Dancer, Starman, Docker
- Why does SSL fail in Starman
- What is the optimal --max-requests setting for Starman?
- PSGI - constructor for each prefork-child
- Apache/Starman - how to implement lots of different webapps with single virtual host
- How do i use Plack Authentication with Session middleware?
- How do you use Plack::Middleware::Session with a Starman Server?
- Using sessions with perl Dancer/plack/Starman and multiple workers
- Why starman / plackup don't recommend option -r
- How do I discover on what server the app.psgi process is running?
- Starman eat all the memory with Dancer REST api
- Supervisor and perlbrew
- Perl supervisor plackup starman perlbrew
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?
Popular Tags
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)
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.