Open bchartier opened 1 week ago
To reproduce, launch python3 checker.py --mode WMS --server https://www.datagrandest.fr/geoserver/ows\?service\=wms\&version\=1.1.1\&request\=GetCapabilities --log-to-file output.log
ps aux | grep python
ls -al /proc/792173/fd/
ls -al /proc/792173/fd/ | wc -l
and TCP connections ss -s
Each connection still open socket (with file)I'm on Fedora workstation on my Laptop. Linux basic limit is 1024 open files.
ulimit -a
show this limit
To increase the limit : ulimit -n 4096
and re-launch python3 checker.py
Today, the software opens the 2133 layers So 2133 sockets and files
edit: I don't think it's a good idea not to reuse one or more open sockets
On a newly installed SDI-CC instance on a Linux desktop computer, we encountered this error whiling runing the checks on DataGrandEst full WMS service: https://www.datagrandest.fr/geoserver/ows
This kind of HTTP requests are managed with the
requests
library (encapsulated withinowslib
code) without using arequests
Session
object. Therefore for each URL tested by SDI-CC a new socket is opened. Using therequests
Session
class would avoid this kind of error and would improve performance.Docs about the Session class : https://docs.python-requests.org/en/latest/user/advanced/#session-objects