[Qgis-developer] qgis-server will crash on a specific project

Andrea Peri aperi2007 at gmail.com
Sun Jun 22 05:01:52 PDT 2014


Hi Marco, other information:

The
MAX_CACHE_LAYERS workarund
Now seem do not work anymore.


2014-06-22 13:48 GMT+02:00 Andrea Peri <aperi2007 at gmail.com>:
> Hi,
> I tested it but don't seem work.
>
> I'm using the master, is that ?
>
> A.
>
>
> 2014-06-22 13:04 GMT+02:00 Marco Hugentobler <marco.hugentobler at sourcepole.ch>:
>> It should work now. Could you test with the current git version? My test
>> projects are not large enough.
>>
>> Regards,
>> Marco
>>
>>
>> On 22.06.2014 12:27, Andrea Peri wrote:
>>>
>>> you have right,
>>> it is not a good solution. Too project depending and resource consuming.
>>>
>>> thx for a better fixing
>>>
>>> A.
>>>
>>> 2014-06-22 12:15 GMT+02:00 Marco Hugentobler
>>> <marco.hugentobler at sourcepole.ch>:
>>>>>
>>>>> char* maxLayerEnv = getenv( "MAX_CACHE_LAYERS" )
>>>>
>>>>
>>>> This is a short-time workaround for users.
>>>>
>>>> Regards,
>>>> Marco
>>>>
>>>>
>>>> On 22.06.2014 12:12, Andrea Peri wrote:
>>>>>
>>>>> Hi,
>>>>> thx for response.
>>>>>
>>>>> meanwhile,
>>>>> I notice that the max allowed layers is exactly 101.
>>>>> This mean (knowing C/C++) an array of 100 elements.
>>>>>
>>>>> Searching for this particular value,
>>>>> i find in the file "mapserver/qgsmslayercache.cpp"
>>>>> is defined
>>>>>           mDefaultMaxLayers = 100;
>>>>>
>>>>> if not defined the environment variable "MAX_CACHE_LAYERS"
>>>>>
>>>>> char* maxLayerEnv = getenv( "MAX_CACHE_LAYERS" );
>>>>>     if ( maxLayerEnv )
>>>>>
>>>>>
>>>>> So a possible solution could be to set this environment variable.
>>>>>
>>>>> I try and report.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Andrea.
>>>>>
>>>>>
>>>>> 2014-06-22 12:07 GMT+02:00 Marco Hugentobler
>>>>> <marco.hugentobler at sourcepole.ch>:
>>>>>>
>>>>>> It is a problem with the layer cache. Will provide a fix for that soon.
>>>>>>
>>>>>> Regards,
>>>>>> Marco
>>>>>>
>>>>>>
>>>>>> On 22.06.2014 11:49, Andrea Peri wrote:
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I confirm.
>>>>>>>
>>>>>>> There is a layer limit in QGIS-Server
>>>>>>>
>>>>>>> I do a huge test removing one by one all the layers from my project.
>>>>>>> And after the removing of every single layer I retest the working.
>>>>>>>
>>>>>>> Aftr a while of time. I reach the limit.
>>>>>>>
>>>>>>> And the project begin to run.
>>>>>>>
>>>>>>> I do other test to exclude that was the number of layer inside a
>>>>>>> single
>>>>>>> group.
>>>>>>> All the test give the response that seem to be the max number of
>>>>>>> layers in a project.
>>>>>>>
>>>>>>> So the question is:
>>>>>>>
>>>>>>> QGIS desktop allow to put more layers rather than how many are
>>>>>>> accepted from qgis-server.
>>>>>>>
>>>>>>> This not good for a WYSIWYG system.
>>>>>>>
>>>>>>> Ok, I will try to patch my server when found exactly where is the
>>>>>>> problem.
>>>>>>>
>>>>>>> Meanwhile,
>>>>>>> Now the question is on what structure is this limit ?
>>>>>>>
>>>>>>> I don't guess it is simply a layer limit but perhaps a more specific
>>>>>>> structure.
>>>>>>>
>>>>>>> Now I have a project that crash , and a project with a one less layer
>>>>>>> that
>>>>>>> work.
>>>>>>>
>>>>>>>
>>>>>>> Doing a DIFF beetween the two projects I see the possible structure
>>>>>>> breakable are:
>>>>>>>
>>>>>>> layer-tree-canvas -> custom-order -> item
>>>>>>> maplayer
>>>>>>> Digitizing -> LayerSnappingList -> value   (type QStringList)
>>>>>>> Digitizing -> LayerSnappingEnabledList -> value   (type QStringList)
>>>>>>> Digitizing -> LayerSnapToList -> value   (type QStringList)
>>>>>>> Digitizing -> LayerSnappingToleranceList -> value   (type QStringList)
>>>>>>>
>>>>>>> I check if in the code there is a limited array dimension for this
>>>>>>> objects.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Andrea.
>>>>>>>
>>>>>>>
>>>>>>> 2014-06-22 7:29 GMT+02:00 Andrea Peri <aperi2007 at gmail.com>:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I do some other tests.
>>>>>>>>
>>>>>>>> I take my project that give QG crash and split it in two compementary
>>>>>>>> projects.
>>>>>>>> Of course I do this using qgis desktop to avoid unvolontary errors.
>>>>>>>>
>>>>>>>> Testing both of them on QS there is no crash !
>>>>>>>>
>>>>>>>> So:
>>>>>>>> The first plausible theory I can give is that Qgis-Server has a LIMIT
>>>>>>>> to the number of Groups or Layers it can have in a project.
>>>>>>>> A limit different (and less) than qgis desktop (osgeo4w version).
>>>>>>>>
>>>>>>>> Is this a plausible theory ?
>>>>>>>>
>>>>>>>> Thx,
>>>>>>>>
>>>>>>>> Andrea.
>>>>>>>>
>>>>>>>>
>>>>>>>> 2014-06-21 22:04 GMT+02:00 Andrea Peri <aperi2007 at gmail.com>:
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>> I have a qgis-server that will crash on a specific project.
>>>>>>>>>
>>>>>>>>> The qgis-server will run correctly with another project that seem
>>>>>>>>> almost similar (both use the SVG symbols).
>>>>>>>>>
>>>>>>>>> The project that crash my QG  run correctly and smootly on a qgis
>>>>>>>>> desktop (qgis-dev) on a windows system.
>>>>>>>>> The project use SVG symbols, but also the other project I test on
>>>>>>>>> QSused SVG symbol
>>>>>>>>> so I suppose the SVG engine is ok.
>>>>>>>>> Also I check t have set correctly the SVG paths.
>>>>>>>>> Also I update to the very last (about 4 hours ago) master version.
>>>>>>>>>
>>>>>>>>> After all this check the qgis-server still crash.
>>>>>>>>>
>>>>>>>>> So I try to set the logfile, but the log is always empty.
>>>>>>>>> This mean that the cgi qgis-server will crash almost immediatly.
>>>>>>>>>
>>>>>>>>> So I set an environment shell to run it manually and to test the cgi
>>>>>>>>> with a gdb session.
>>>>>>>>>
>>>>>>>>> The results are this:
>>>>>>>>>
>>>>>>>>> ..................
>>>>>>>>> [Thread debugging using libthread_db enabled]
>>>>>>>>> Using host libthread_db library
>>>>>>>>> "/lib/x86_64-linux-gnu/libthread_db.so.1".
>>>>>>>>> Warning 1: Unable to find driver ECW to unload from GDAL_SKIP
>>>>>>>>> environment variable.
>>>>>>>>> Warning 1: Unable to find driver ECW to unload from GDAL_SKIP
>>>>>>>>> environment variable.
>>>>>>>>> Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP
>>>>>>>>> environment variable.
>>>>>>>>> Warning 1: Unable to find driver ECW to unload from GDAL_SKIP
>>>>>>>>> environment variable.
>>>>>>>>> Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP
>>>>>>>>> environment variable.
>>>>>>>>> [New Thread 0x7fffe307c700 (LWP 1844)]
>>>>>>>>> [New Thread 0x7fffe27ea700 (LWP 1845)]
>>>>>>>>>
>>>>>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>> 0x00007ffff4fc06da in qHash(QString const&) ()
>>>>>>>>>       from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
>>>>>>>>> (gdb)
>>>>>>>>> ............................
>>>>>>>>>
>>>>>>>>> The version of libQtCore.so.4 I run on the linux is 4.8.2.
>>>>>>>>>
>>>>>>>>> Perhaps the 4.8.2 is too old for qgis-server ?
>>>>>>>>> :/
>>>>>>>>> But another project will run without any apparent problem.
>>>>>>>>> ?
>>>>>>>>>
>>>>>>>>> Many thx for every hint.
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> -----------------
>>>>>>>>> Andrea Peri
>>>>>>>>> . . . . . . . . .
>>>>>>>>> qwerty àèìòù
>>>>>>>>> -----------------
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> -----------------
>>>>>>>> Andrea Peri
>>>>>>>> . . . . . . . . .
>>>>>>>> qwerty àèìòù
>>>>>>>> -----------------
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Dr. Marco Hugentobler
>>>>>> Sourcepole -  Linux & Open Source Solutions
>>>>>> Weberstrasse 5, CH-8004 Zürich, Switzerland
>>>>>> marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
>>>>>> Technical Advisor QGIS Project Steering Committee
>>>>>>
>>>>>> _______________________________________________
>>>>>> Qgis-developer mailing list
>>>>>> Qgis-developer at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Dr. Marco Hugentobler
>>>> Sourcepole -  Linux & Open Source Solutions
>>>> Weberstrasse 5, CH-8004 Zürich, Switzerland
>>>> marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
>>>> Technical Advisor QGIS Project Steering Committee
>>>>
>>>> _______________________________________________
>>>> Qgis-developer mailing list
>>>> Qgis-developer at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>>
>>>
>>
>>
>> --
>> Dr. Marco Hugentobler
>> Sourcepole -  Linux & Open Source Solutions
>> Weberstrasse 5, CH-8004 Zürich, Switzerland
>> marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
>> Technical Advisor QGIS Project Steering Committee
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------



-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------


More information about the Qgis-developer mailing list