Top like monitoring for Pyramid / Gunicorn

15 views
Skip to first unread message

Mikko Ohtamaa

unread,
Aug 21, 2022, 2:23:33 PM8/21/22
to pylons-...@googlegroups.com
Hi all,

I am running Pyramid + SQLAlchemy website on the top of Gunicorn. Sometimes requests get stuck of the Pyramid application becomes non-responsive for certain requests (not all). Despite good attempts using Gunicorn statsd monitoring, I have had no good success to pin down these problematic requests.

Do you know any tools that could offer UNIX top like monitoring for the currently active requests? I know this is a far shot - Gunicorn did not seem to offer any interface in its documentation to offer anything like this. And if this is not the case, which is unfortunately likely, what would be nice way to pull start request and stop request events from Pyramid to a separate CLI tool, so one could see when bad things start to happen?

Br,
Mikko

David Glick

unread,
Aug 21, 2022, 2:31:35 PM8/21/22
to pylons-...@googlegroups.com
You can use https://github.com/benfred/py-spy#dump to get a stack trace from a separate running Python process. It won’t show the current request paths but perhaps it could be adapted to do so.

David

On Aug 21, 2022, at 11:23 AM, Mikko Ohtamaa <mi...@redinnovation.com> wrote:


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAK8RCUs%2BfahvVuq6Ww5i7WfTND2_h45_t7KnXOtofE_ubZxPZw%40mail.gmail.com.

Jonathan Vanasco

unread,
Aug 22, 2022, 10:50:18 AM8/22/22
to pylons-discuss
Have you tried using statsd ?  (https://github.com/statsd/statsd)

See 

Typically you log each request start and the stop reason (success, type of error, etc) and major actions -- e.g. login attempt + login result, inbound request, etc.  Everything looks nice in graphite, and you can see when you start having issues.  It's incredibly useful for monitoring the effects of pushing a new release to production, but it is often used for debugging logic issues as well.

Nejc Zupan

unread,
Aug 22, 2022, 12:25:20 PM8/22/22
to pylons-...@googlegroups.com
I’ve used NewRelic with success in the past, but its a cloud thingy so doesn’t apply to all use cases.


--
Excuse brevity, sent from a mobile device.

On 22 Aug 2022, at 16:50, 'Jonathan Vanasco' via pylons-discuss <pylons-...@googlegroups.com> wrote:

Have you tried using statsd ?  (https://github.com/statsd/statsd)
--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages