Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Async processes accumulate until failure with sqlite in-memory

未关闭
#495 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python, sqlite
领域
backend, databases

调研方向

使用 logging.database=sqlite:///:memory: 和 server.parallelprocesses=5 重现该问题,然后检查 dblog.py 中运行计数附近的代码,以及 Process.py 中相关队列和状态处理的代码。确认已完成的异步任务不再占用进程限制,并确认后续请求会收到适当的排队状态和响应。

由索引模型根据 Issue 内容生成。

描述

bug

Description

This relates to running processes in async mode, with logging.database=sqlite:///:memory:

When an async process completes, i.e. (pywps_requests.percent_done: 100.0, pywps_requests.status: 4) the running_count reported by dblog never seems to reflects this.

So if I set parallelprocesses=5 I can execute 5 successful jobs, however each job increments this running count, which is never decremented on completion, meaning I can only run 5 before all I get is ‘PyWPS Process GetSubset accepted’ response for a process which never runs.

This issue only seems to happen when using in-memory sqlite (i.e. does not occur when supplying my own sqlite db string).

Environment

  • operating system: Debian
  • Python version: 3.6.5
  • PyWPS version: 4.2.2
  • source/distribution
  • git clone
  • Debian
  • PyPI
  • zip/tar.gz
  • other (please specify):
  • web server
  • Apache/mod_wsgi
  • CGI
  • other (please specify): nginx/gunicorn

Steps to Reproduce

  • Run pywps configured with
    • logging.database=sqlite:///:memory:
    • server.parallelprocesses=5
  • Submit 5 async requests
    • i.e. with storeExecuteResponse=true&status=true
  • should work as expected, then on 6th request:
  • nothing else can run now

Additional Information

This is being run in a docker container from macos host, don’t think it should affect this 🤔

主要语言
Python
星标
186
派生
116
平均合并
11 天 20 小时
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

geopython/pywps 的其他 Issue

查看 geopython/pywps 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。