sessions are not reaped
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker-compose, javascript, postgresql, shell
Research direction
Start by checking the executable permission on reap-sessions.sh and how the cron invocation runs it; the issue reproduces the failure with docker compose exec service. Confirm the script can be executed through that command and that expired sessions are reaped. The issue also points to #2339 as the reason this failure is silent.
Written by the indexing model from the issue text.
Description
reap-sessions.sh is not executable. This means when it's invoked by cron, it fails. This can be demoed with:
$ docker compose exec service /usr/bin/with-pgenvblock.pl /dev/shm/docker-envblock /usr/odk/reap-sessions.sh; echo "exit=$?"
Can't exec "/usr/odk/reap-sessions.sh": Permission denied at /usr/bin/with-pgenvblock.pl line 24.
Died at /usr/bin/with-pgenvblock.pl line 24.
exit=13
Due to https://github.com/getodk/central/issues/2339, this failure is silent.
Example from staging server:
> SELECT COUNT(*) AS total_sessions
, COUNT(*) FILTER (WHERE "expiresAt" < now()) AS expired_sessions
, MIN("expiresAt") AS earliest_expires_at
, MAX("expiresAt") AS latest_expires_at
FROM sessions;
total_sessions | expired_sessions | earliest_expires_at | latest_expires_at
----------------+------------------+----------------------------+------------------------
6234 | 5380 | 2022-10-07 08:29:04.632+00 | 9999-12-31 23:59:59+00
- Dominant language
- JavaScript
- Stars
- 233
- Forks
- 241
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 13
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getodk/central
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
The `New Submission` button on the Submissions tab is now harder to access on mobilePossibly taken @sadiqkhoja claimed this 1 day ago. Openfrontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
getodk/central#2334 · 1 assignee ·
Maintainers usually reply within 1 day
-
Copying text from table clicks on the rowPossibly taken @sadiqkhoja claimed this 1 day ago. Openfrontend needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getodk/central#2331 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Hide closed formsPossibly taken @nicoleorlowski claimed this 8 days ago. Openfrontend needs testing
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
getodk/central#2323 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Remove Feedback buttonPossibly taken @lognaturel claimed this 9 days ago. Openfrontend
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
getodk/central#2322 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
Escaped `*` followed by `*` (`\**`) never matchesPossibly taken @bardrop claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
editorconfig/editorconfig-core-js#172 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fb55/htmlparser2#2579 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Provider editor: multiple top plugin options overlap Models because .top caps the container at 46pxOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100