dd-trace-py
dd-trace-py copied to clipboard
Sigterm causing `func_wrapper` to raise an exception
Which version of dd-trace-py are you using?
0.51.1
Which version of pip are you using?
21
Which version of the libraries are you using?
flask 1.14 sentry sdk 1.3.1
How can we reproduce your problem?
good question! This is where I am not sure.
What is the result that you get?
Unhandled exception from ddtrace when trying to shutdown from a sigterm
Here is the breadcrumbs from sentry
Here is our stracktrace (bottom to top)
frame
<frame at 0x7fdc121d45c0, file '/app/.heroku/python/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py', line 1645, code bindparam_string>
signal
15
sqlalchemy/sql/compiler.py in bindparam_string at line 1645
sqlalchemy/sql/compiler.py in visit_bindparam at line 1584
sqlalchemy/dialects/postgresql/psycopg2.py in visit_bindparam at line 651
sqlalchemy/sql/visitors.py in _compiler_dispatch at line 96
sqlalchemy/sql/crud.py in _create_bind_param at line 198
sqlalchemy/sql/crud.py in _extend_values_for_multiparams at line 702
sqlalchemy/sql/crud.py in _get_crud_params at line 183
sqlalchemy/sql/crud.py in _setup_crud_params at line 64
sqlalchemy/sql/compiler.py in visit_insert at line 2468
sqlalchemy/sql/visitors.py in _compiler_dispatch at line 96
sqlalchemy/sql/compiler.py in process at line 352
sqlalchemy/sql/compiler.py in __init__ at line 322
sqlalchemy/sql/compiler.py in __init__ at line 592
sqlalchemy/sql/elements.py in _compiler at line 487
sqlalchemy/sql/elements.py in compile at line 481
<string> in <lambda> at line 1
sqlalchemy/engine/base.py in _execute_clauseelement at line 1121
sqlalchemy/sql/elements.py in _execute_on_connection at line 298
sqlalchemy/engine/base.py in execute at line 1011
sqlalchemy/orm/session.py in execute at line 1296
sqlalchemy/orm/scoping.py in do at line 163
app/performance.py in _bulk_insert_cost_bases at line 501
app/performance.py in save at line 456
app/performance.py in _compute_cost_basis_for_user at line 279
app/performance.py in compute_cost_basis_for_user at line 61
ddtrace/tracer.py in func_wrapper at line 857
app/performance.py in compute_cost_basis_for_user_id at line 42
app/jobs.py in compute_cost_basis at line 54
app/core/jobs/jobs.py in decorator at line 36
rq/job.py in _execute at line 772
rq/job.py in perform at line 749
rq/worker.py in perform_job at line 1031
What is the result that you expected?
Not getting an unhandled exception from ddtrace
@yawhide Can you also share details on your web server and its configuration?
@yawhide Can you also share details on your web server and its configuration?
what do you need? I am not sure what to give :)
we use this command to run out flask server
gunicorn app:app --certfile=/path/to/cert --keyfile=/path/to/key -b 127.0.0.1:5000 --worker-class=gevent --timeout=60 --log-file=-
that exception is from one of our workers which is ran by doing:
honcho start -c worker=10 -f procfiles/default_worker.procfile
(default_worker.procfile looks like ddtrace-run python run_worker.py
)
@yawhide does this issue still manifest when you upgrade to ddtrace 1.15?
@yawhide does this issue still manifest when you upgrade to ddtrace 1.15?
I cannot see this issue anymore!