<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        
                                        
                                            
                                        
                                        
                                        We have experienced the same issue -- memory leaks -- with our Dancer-based app.  <span style="font-size: 10pt">Not sure if it's Dancer, underlying Perl, or UWSGI itself, but haven't been able to debug and would certainly appreciate any tips!</span><div><br></div><div>As a <u style="font-weight: bold;">workaround</u>, we use the reload-on-rss option on UWSGI to reload bloated workers.  Here's a recipe, with sample settings:<div class="mb_sig"></div>
                                        
                                        </div><div><br></div><div><div><span style="font-size: 13.3333px">processes = 6             # have 6 workers loaded simultaneously</span></div><div><span style="font-size: 13.3333px">reload-on-rss = 800    # if a worker reaches 800MB RSS allocated, reload it after it finishes.</span></div><div><span style="font-size: 13.3333px">harakiri = 120              # (for good measure) hung workers die after 120 seconds</span></div></div><div><br></div><div>The reload-on-rss setting obviously depends on the size of your app, with a bit of headroom for it to bloat  until it gets restarted.  <span style="font-size: 10pt">Make sure (# of processes) * (reload-on-rss) < (available memory).</span></div><div><br></div><div><br></div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">On 3/29/2021 9:39:58 AM, Zahir Lalani <zahirlalani@oliver.agency> wrote:</p><div style="font-family:Arial,Helvetica,sans-serif">Confidential
<br>
<br>Hi all
<br>
<br>Wondering if I can get some guidance. Our application is growing in use and have recently found that UWSGI runs out of worker resources - but when we use uwsgitop, its more that memory has shot up. The only way to resolve is a restart of uwsgi.
<br>
<br>That sounds like a memory leak, but I am not sure what tools can help me in that regard. I assumed that Perl was quite good at cleanup, but something is not right here.
<br>
<br>Any guidance appreciated
<br>
<br>Z
<br>_______________________________________________
<br>dancer-users mailing list
<br>dancer-users@lists.preshweb.co.uk
<br>https://lists.preshweb.co.uk/mailman/listinfo/dancer-users
<br></div></blockquote></div>