1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
Commit graph

5 commits

Author SHA1 Message Date
Daniel Colson
39d16fadaf Add pumactl command to print thread backtraces (#2054)
* Add pumactl command to print thread backtraces

Completes 1 of 2 items from #1964

This commit adds an endpoint to the status app to print thread
backtraces, and control cli command to call that endpoint.

I tried this locally by starting a server with:

```sh
bundle exec bin/puma test/rackup/hello.ru \
  --control-url="unix://test.sock" \
  --control-token="token"
```

and then printing the backtraces with:

```sh
bundle exec bin/pumactl thread-backtraces \
  --control-url="unix://test.sock" \
  --control-token="token"
```

* Log threads as JSON in control app

With this commit the status app sends the thread backtraces as an array
of objects with `name` and `backtrace` keys, rather than as a string
matching the SIGINFO output.

While working on this I noticed that we logged the thread TID twice.
This commit simplifies that so we only log the thread TID once, with
both the label (I don't know when the label would get set) and name if
they are available.
2019-11-11 13:08:41 +08:00
Nate Berkopec
a585772402
Launcher: privatize write_pid, use log 2019-09-20 11:51:57 +02:00
Nate Berkopec
e864e28b13
Launcher test cleanup (#1966)
* Add no-bundler skip

* Remove unnecessary test requires

* Little bit of launcher test cleanup
2019-09-13 16:44:02 +00:00
Nate Berkopec
e96e798068
SIGINFO prints thread backtraces (#1320) 2019-09-12 09:59:54 +00:00
Dave Allie
809a3f4c7b Allow extra runtime deps to be defined when using prune_bundler (#1105)
* Allow extra runtime deps to be defined when using prune_bundler

* Check extra_runtime_dependencies is set before iterating over them

* Load additional paths for extra runtime dep gems

* Don't load extra dependencies, just add their paths to $LOAD_PATH

* Fix typos and extraneous checks and rescues

* Use Gem::Specification#full_require_paths when available

* Prevent use of prune_bundler and extra_runtime_dependencies with early versions of RubyGems

* Ensure LOAD_PATH is modified by extra_runtime_dependencies

* Refactor prune_bundler in launcher.rb and write some unit tests
2019-09-02 16:10:33 +00:00