[Qgis-user] WFS - Env variable QGIS_SERVER_API_WFS3_MAX_LIMIT not working
Tommaso
tommasodb at googlemail.com
Wed Feb 15 00:47:24 PST 2023
Hello,
I searched in the Qgis source code for a environment variable, which could
be used to limit WFS requests on the server side (wfs 1.0.0 and 1.1.0), but
without success.
So I assume that Qgis Server does not support it.
Can someone confirm my assumption?
Best regards, Tommaso
On Tuesday 14 February 2023 13:13:08 (+01:00), Tommaso wrote:
> Hello Alessandro,
>
> there is a way to limit old WFS requests?
> Tommaso
>
>
> On Tuesday 14 February 2023 12:15:22 (+01:00), Alessandro Pasotti wrote:
>
>
> > Hi,
>
> >
> > that variable is for OAPIF (AKA WFS3) only, it does not apply to plain
old WFS.
>
> >
> > There is a bug in the manual, I'll fix that.
>
> >
> > It should read:
>
> >
> > QGIS_SERVER_API_WFS3_MAX_LIMIT
>
> >
> > Maximum value for limit in a OAPIF features request.
>
> >
> >
> >
> > On Tue, Feb 14, 2023 at 12:11 PM Tommaso via QGIS-User
>
> > <qgis-user at lists.osgeo.org> wrote:
>
> > >
>
> > > Hello,
>
> > > I'm trying to limit the max number of features returned by my Qgis
Server
>
> > > using the environment variable QGIS_SERVER_API_WFS3_MAX_LIMIT
>
> > >
>
> > > QGIS_SERVER_API_WFS3_MAX_LIMIT=1000
>
> > >
>
> > > The server seems to consider the variable and write to the log file
>
> > >
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_API_WFS3_MAX_LIMIT /
>
> > > '/qgis/server_api_wfs3_max_limit' (Maximum value for "limit" in a
features
>
> > > request, defaults to 10000): '1000' (read from ENVIRONMENT_VARIABLE)
>
> > >
>
> > > The server should return max 1000 features, but it still returns all
>
> > > features. The limit is ignored. How can I debug the problem?
>
> > >
>
> > > My WFS request:
>
> > >
http://XXXXXXXXX/qgisserver?SERVICE=WFS&VERSION=1.0.0&MAP=/etc/qgisserver/project.qgs&service=WFS&request=GetFeature&typename=Gemeinde
>
> > >
>
> > >
>
> > > Version: Qgis Server 3.28.0 (camptocamp docker image)
>
> > >
>
> > > The begin of the log file:
>
> > >
>
> > >
>
> > > 10:41:20 INFO Server[90]: QGIS Server Starting : 3.28.0-Firenze
>
> > > (ed3ad0430f)
>
> > > 10:41:20 INFO Server[90]: QGIS Server Settings:
>
> > > 10:41:20 INFO Server[90]: - QGIS_OPTIONS_PATH / '' (Override the
default
>
> > > path for user configuration): '' (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_PARALLEL_RENDERING /
>
> > > '/qgis/parallel_rendering' (Activate/Deactivate parallel rendering
for WMS
>
> > > getMap request): 'false' (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_MAX_THREADS /
'/qgis/max_threads'
>
> > > (Number of threads to use when parallel rendering is activated):
'-1' (read
>
> > > from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_LOG_LEVEL / '' (Log
level): '0'
>
> > > (read from ENVIRONMENT_VARIABLE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_LOG_FILE / '' (Log file):
>
> > > '/etc/qgisserver/qgisserver.log' (read from ENVIRONMENT_VARIABLE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_LOG_STDERR / ''
>
> > > (Activate/Deactivate logging to stderr): '1' (read from
>
> > > ENVIRONMENT_VARIABLE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_PROJECT_FILE / '' (QGIS project
file):
>
> > > '' (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_IGNORE_BAD_LAYERS / ''
(Ignore
>
> > > bad layers): 'false' (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_CACHE_DIRECTORY /
>
> > > '/cache/directory' (Specify the cache directory):
>
> > > '/tmp/profiles/default/cache' (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_CACHE_SIZE / '/cache/size'
>
> > > (Specify the cache size): '268435456' (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_SHOW_GROUP_SEPARATOR /
>
> > > '/locale/showGroupSeparator' (Show group (thousands) separator):
'false'
>
> > > (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_OVERRIDE_SYSTEM_LOCALE /
>
> > > '/locale/userLocale' (Override system locale): '' (read from
DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_WMS_MAX_HEIGHT /
>
> > > '/qgis/max_wms_height' (Maximum height for a WMS request. The lower
one of
>
> > > this and the project configuration is used.): '-1' (read from
>
> > > DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_WMS_MAX_WIDTH /
>
> > > '/qgis/max_wms_width' (Maximum width for a WMS request. The most
>
> > > conservative between this and the project one is used): '-1' (read
from
>
> > > DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_API_RESOURCES_DIRECTORY /
>
> > > '/qgis/server_api_resources_directory' (Base directory where HTML
templates
>
> > > and static assets (e.g. images, js and css files) are searched for)
>
> > > : '/usr/local/share/qgis/resources/server/api' (read from
DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_API_WFS3_MAX_LIMIT /
>
> > > '/qgis/server_api_wfs3_max_limit' (Maximum value for "limit" in a
features
>
> > > request, defaults to 10000): '1000' (read from ENVIRONMENT_VARIABLE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_TRUST_LAYER_METADATA / ''
(Trust
>
> > > layer metadata): 'false' (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_FORCE_READONLY_LAYERS / ''
(Force
>
> > > to open layers in read-only mode): 'false' (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_DISABLE_GETPRINT / ''
(Don't load
>
> > > layouts): 'false' (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: -
QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES
>
> > > / '/qgis/server_projects_directories' (Directories used by the
landing page
>
> > > service to find .qgs and .qgz projects): '' (read from DEFA
>
> > > ULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: -
>
> > > QGIS_SERVER_LANDING_PAGE_PROJECTS_PG_CONNECTIONS /
>
> > > '/qgis/server_projects_pg_connections' (PostgreSQL connection
strings used
>
> > > by the landing page service to find projects): '' (read
>
> > > from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_LOG_PROFILE /
>
> > > '/qgis/server_log_profile' (Add detailed profile information to the
logs,
>
> > > only effective when QGIS_SERVER_LOG_LEVEL=0): 'false' (read from
>
> > > DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_WMTS_SERVICE_URL /
>
> > > '/qgis/server_wmts_service_url' (The default WMTS service URL): ''
(read
>
> > > from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_OPTIONS_PATH / '' (): '' (read
from
>
> > > DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_OPTIONS_PATH / '' (): '' (read
from
>
> > > DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_OPTIONS_PATH / '' (): '' (read
from
>
> > > DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_OPTIONS_PATH / '' (): '' (read
from
>
> > > DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: - QGIS_SERVER_LANDING_PAGE_PREFIX /
>
> > > '/qgis/server_landing_page_base_url_prefix' (Landing page base URL
path
>
> > > prefix): '' (read from DEFAULT_VALUE)
>
> > > 10:41:20 INFO Server[90]: -
QGIS_SERVER_PROJECT_CACHE_CHECK_INTERVAL /
>
> > > '/qgis/server_project_cache_check_interval' (The default project
cache
>
> > > check interval): '0' (read from DEFAULT_VALUE)
>
> > >
>
> > >
>
> > > Thank you and best regards,
>
> > > Tommaso
>
> > >
>
> > > _______________________________________________
>
> > > QGIS-User mailing list
>
> > > QGIS-User at lists.osgeo.org
>
> > > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
> > > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
> >
> >
> >
--
More information about the QGIS-User
mailing list