# APM not showing data in Kibana when running app through gunicorn wsgi

**URL:** <https://discuss.elastic.co/t/apm-not-showing-data-in-kibana-when-running-app-through-gunicorn-wsgi/206372>\
**Category:** APM\
**Tags:** python\
**Created:** [November 4, 2019, 10:38am UTC](https://discuss.elastic.co/t/apm-not-showing-data-in-kibana-when-running-app-through-gunicorn-wsgi/206372 "2019-11-04T10:38:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![umarriqbal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umarriqbal/32/57081_2.png) [@umarriqbal](https://discuss.elastic.co/u/umarriqbal)\
**Post date:** [November 4, 2019, 10:38am UTC](https://discuss.elastic.co/t/apm-not-showing-data-in-kibana-when-running-app-through-gunicorn-wsgi/206372/1 "2019-11-04T10:38:59Z")

</div>

No data is being shown in Kibana UI or APM server logs if I run the app in production using gunicorn WSGI but if I run it through command line with the same settings, it works fine.

**Kibana version** : 7.4.1

**Elasticsearch version** : 7.4.1

**APM Server version** : 7.4.1

**APM Agent language and version** : Python 5.2.2

**Browser version** : Safari 13.0.2

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: Curl to download page. It's a fresh install.

**Steps to reproduce** :

1. Create a basic flask app and begin and end a transaction in an API.
2. Run it as gunicorn wsgi:app gunicorn\_file.py
3. Hit the Flask API url.

**Errors in browser console (if relevant)**:

There are no errors but there also aren't any APM server logs that the events are being sent to the server. Consequently no data in the Kibana UI.

**Provide logs and/or server output (if relevant)**:

If RUM enabled:

{"request\_id": "2838cae6-2a85-427e-8b7d-2a0376cb9b0a", "method": "POST", "URL": "/config/v1/agents", "content\_length": 49, "remote\_address": "127.0.0.1", "user-agent": "elasticapm-python/5.2.2", "response\_code": 200}

Else:

{"request\_id": "2838cae6-2a85-427e-8b7d-2a0376cb9b0a", "method": "POST", "URL": "/config/v1/agents", "content\_length": 49, "remote\_address": "127.0.0.1", "user-agent": "elasticapm-python/5.2.2", "response\_code": 403, "error": "forbidden request: endpoint is disabled"}

---

<div class="post-metadata">

**Author:** ![umarriqbal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/umarriqbal/32/57081_2.png) [@umarriqbal](https://discuss.elastic.co/u/umarriqbal)\
**Post date:** [November 6, 2019, 6:23am UTC](https://discuss.elastic.co/t/apm-not-showing-data-in-kibana-when-running-app-through-gunicorn-wsgi/206372/2 "2019-11-06T06:23:47Z")

</div>

I was able to resolve this by removing `pre_load = True` from the gunicorn file.  
Welcome to any other solutions that'll help me get around this.

---

<div class="post-metadata">

**Author:** ![basepi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/basepi/32/53056_2.png) [@basepi](https://discuss.elastic.co/u/basepi)\
**Post date:** [November 11, 2019, 11:16pm UTC](https://discuss.elastic.co/t/apm-not-showing-data-in-kibana-when-running-app-through-gunicorn-wsgi/206372/3 "2019-11-11T23:16:37Z")

</div>

Thanks for posting your issue, @umarriqbal! Since you also posted [an issue](https://github.com/elastic/apm-agent-python/issues/624) I'm going to follow up there, primarily, but wanted to welcome you to the forum (and leave a bread crumb for future visitors to this post).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 2, 2019, 7:16pm UTC](https://discuss.elastic.co/t/apm-not-showing-data-in-kibana-when-running-app-through-gunicorn-wsgi/206372/4 "2019-12-02T19:16:56Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
