Skip to content

Server LTR: QGIS_SERVER_CACHE_DIRECTORY is ignored - QNetworkDiskCache::prepare() unable to open temporary file #59613

Description

@lorenzogrv

What is the bug or the crash?

I'm not sure this is a bug. Qgis server tries to cache WMS requests but fails with:

QNetworkDiskCache::prepare() unable to open temporary file

After some research this seems related to the QGIS_PREFIX_PATH env variable. There isn't too much about that variable on docs. Please see:

Our qgis-server is running at a container which has QGIS_PREFIX_PATH=/usr. Perms inside /usr directory are drwxr-xr-x root root. That seems to have sense for me.

The qgis user runs the qgis-server because we don't want our container running its process as root.

It seems qgis user needs write permissions somewhere within /usr. That does not make sense for me.

  • ¿Does WMS cache need to write files with QGIS_PREFIX_PATH?
  • ¿Where does WMS cache need the write perms?

Steps to reproduce the issue

Need feedback to provide an useful reproduction

Versions

$ qgis_mapserver --version
QGIS 3.34.12-Prizren 'Prizren' (exported)
QGIS code branchRelease 3.34
Qt version 5.15.15
Python version 3.12.7
GDAL/OGR version 3.9.3
PROJ version 9.5.0
EPSG Registry database version v11.016 (2024-08-31)
GEOS version 3.13.0-CAPI-1.19.0
SQLite version 3.46.1
OS Debian GNU/Linux trixie/sid

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!ServerRelated to QGIS server

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions