geopython / geopython/GeoHealthCheck

Slow response in web app

Open
#326 8 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Python
Stars
92
Forks
75
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
The application is really slow, or even stops working, if there is a high number of services configured and / or there are too many historical records in the database.

**To Reproduce**
Publish a high number of services (ie. 800) , keep 90 days of history and check services every hour.
Looks like the home page tries to load too many records from the database trying to show the general stats of the instance and the web app fails.

**Expected Behavior**
The web app loads successfully.

**Suggestion**
In addition to reduce the number of days of history and frequency of checks it could help to include some indexes in the database.

For example:

```sql

CREATE INDEX run_res_ident_idx
ON public.run (resource_identifier);

CREATE INDEX res_tag_res_ident_idx
ON public.resource_tags (resource_identifier);

CREATE INDEX res_tag_tag_idx
ON public.resource_tags (tag_id);

CREATE INDEX resource_res_type_idx
ON public.resource (resource_type);

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.