Opened 20 years ago

Closed 19 years ago

#798 closed enhancement (fixed)

need a way to limit max features server-side

Reported by: bartvde@… Owned by: jmckenna@…
Priority: high Milestone: 4.4 release
Component: WFS Server Version: 4.3
Severity: minor Keywords:
Cc:

Description

As discussed during the MUM, it would be a nice enhancement to have a variable
which controls the maximum number of features a WFS server will serve, in order
to protect the server from getting heavy work and even getting down.

In my opinion, this would also need to be discussed on the wfs-dev mailing list,
as a service should advertize this probably in its capabilities to make it
useful. I will write to the wfs-dev list.

Change History (9)

comment:1 by dmorissette, 20 years ago

This has been brought up on the WFS-DEV list already on July 12th without much
success. You can try again if you like, but anyway that doesn't mean we cannot
put some security in place in MapServer to prevent server overload. This could
be done by adding a wfs_maxfeatures metadata.  We should also take into
consideration whether the client can override the wfs_maxfeature by passing a
larger MAXFEATURES value in the request.

comment:2 by bartvde@…, 20 years ago

Daniel, implementation will be difficult because of the following corresponding
bug report:

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=551

or not?

This means that with the current implementation, a user could still extract the
whole database or shapefile. Although not everything will be sent to the user.

I think the server-side value should always overrule the client-side parameter,
otherwise the protection is not a 100% safe for a server.

comment:3 by dmorissette, 20 years ago

I don't think bug 551 makes the implementation more difficult, it just makes it
less efficient. For now you can at least limit the number of objects returned in
the GML response, that will solve the main problem. When bug 551 is fixed then
the maxfeature value can be propagated down to the query functions to get the
best possible performance.

I also agree that the server-side setting should take precedence over the
client-side maxfeatures parameter.

comment:4 by assefa, 20 years ago

Working on this.

Here are the changes that I am going to do 
 - use of wfs_maxfeatures metadata (set at the web level) to control the 
number of elements returned.

  - the wfs_maxfeatures has priority over the maxfeature parameter passed by 
the user if latest is bigger that the one set with the metadata.

 - if the wfs_maxfetaures is not set, the current behaviour is not changed.


comment:5 by dmorissette, 20 years ago

Milestone: 4.4 release
Status: newassigned

comment:6 by assefa, 20 years ago

Milestone: 4.4 release
Owner: changed from mapserverbugs to jmckenna@…
Status: assignednew
Corrected as described in comment#4.

Reassigning to Jeff for documenation update

comment:7 by assefa, 20 years ago

Milestone: 4.4 release

comment:8 by assefa, 20 years ago

Cc: mapserver-bugs@… added

comment:9 by jmckenna@…, 19 years ago

Resolution: fixed
Status: newclosed
added wfs_maxfeatures metadata in the web object of the wfs-server doc.
committed to cvs.
Note: See TracTickets for help on using tickets.