[GeoNode-users] view_layer slowing down

FERRARI Hugo ferrari_hugo at yahoo.fr
Sun Aug 9 23:59:12 PDT 2015


hello

I think the issue came from my geonode instance, as I had to modify it.
I resolved my issue, now the responding time is as fast as in the begining.
I'm sorry if I make you loose time.
I you want explanations, here it is:

I had to change the permission management system,
because the society I work for wanted to display the whole catalog 
first, before verifying if the  current user can see the resource detail.
so everybody can see all resources in the list, in the resource lists 
(with a litle logo if you can't visualize  it with geoexplorer or any 
OWS services).
then if you click on a snippet you ll have a custom detail_resource 
template .

Why this change made my geonode being so slow ?
When building the view for the resource detail  ,
a context_dict with few infos on the resource is added to the response 
(see the code 
<https://github.com/GeoNode/geonode/blob/418927a1e321674164ebae0d91825a3ce20b12ec/geonode/layers/views.py#L272>)
*_perms_info_json* is called from the security view.
if you want the traceback, the "top level call" comes from****
security.models.*get_all_level_info *
*get_users_with_perms* is the guardian shortcut which takes at least 
five second to be executed, because it makes the query I report from 
postgres log.

I replaced the call to  _perms_info_json by an empty dict as I didn't 
need it anymore.
but there is no reason why it takes much more time in my db than in 
yours, because I have only 250 resources and 20 users.

I hope it was clear,
Do I have to create a new ticket as it may come from my instance ?
thanks again,
Hugo


Le 07/08/2015 23:00, geonode-users-request at lists.osgeo.org a écrit :
> Send geonode-users mailing list submissions to
> 	geonode-users at lists.osgeo.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
> or, via email, send a message with subject or body 'help' to
> 	geonode-users-request at lists.osgeo.org
>
> You can reach the person managing the list at
> 	geonode-users-owner at lists.osgeo.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of geonode-users digest..."
>
>
> Today's Topics:
>
>     1. Re: view_layer slowing down (Stefan Steiniger)
>     2. Re: view_layer slowing down (Paolo Corti)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: 7 Aug 2015 10:35:14 -0400
> From: "Stefan Steiniger" <sstein at geo.uzh.ch>
> To: geonode-users at lists.osgeo.org
> Subject: Re: [GeoNode-users] view_layer slowing down
> Message-ID: <55C4C222.40703 at geo.uzh.ch>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> Hey Hugo,
>
> How many users do you have? And how many datasets (well, I guess layers
> in this case, not docs)?
>
> I have only very few contributing users (4-5 at the moment), but the
> list of people with login grows now (currently 45). Click on the
> "Layers" list view is resolved in about 4 secs.
> So I wonder from what size on one needs to to worry.
> (though, I am on 2.0)
>
> ciao,
> stefan
>
> Am 07.08.15 um 07:12 schrieb Simone Dalmasso:
>> Hi Hugo thanks for the detailed report. We are trying to improve the
>> performances when there are a lot of users, although for this case (
>> detail template) there might be a way to avoid such a big query.
>>
>> I think we still have one open ticket, could you check and
>> integrate/create it in case? I'll take a look asap.
>>
>> Ciao.
>>
>> Il venerd? 7 agosto 2015, FERRARI Hugo <ferrari_hugo at yahoo.fr
>> <mailto:ferrari_hugo at yahoo.fr>> ha scritto:
>>
>>      Hello everybody
>>      as my geonode database gets bigger, displaying layer details
>>      template goes very slow.
>>      It takes more than 10 seonds to display layer template.
>>
>>      found in postgres log, here's a big request that takes almost 5
>>      seconds to execute
>>
>>        SELECT  distinct "people_profile"."id",
>>      "people_profile"."password", "people_profile"."last_login",
>>      "people_profile"."is_superuser", "people_profile"."username",
>>      "people_profile"."first_name", "people_profile"."last_name",
>>      "people_profile"."email", "people_profile"."is_staff",
>>      "people_profile"."is_active", "people_profile"."date_joined",
>>      "people_profile"."organization", "people_profile"."profile",
>>      "people_profile"."position", "people_profile"."voice",
>>      "people_profile"."fax", "people_profile"."delivery",
>>      "people_profile"."city", "people_profile"."area",
>>      "people_profile"."zipcode", "people_profile"."country"
>>        FROM "people_profile"
>>        LEFT OUTER JOIN "guardian_userobjectpermission" ON (
>>      "people_profile"."id" = "guardian_userobjectpermission"."user_id" )
>>        LEFT OUTER JOIN "people_profile_groups" ON ( "people_profile"."id"
>>      = "people_profile_groups"."profile_id" )
>>        LEFT OUTER JOIN "auth_group" ON (
>>      "people_profile_groups"."group_id" = "auth_group"."id" )
>>        LEFT OUTER JOIN "guardian_groupobjectpermission" ON (
>>      "auth_group"."id" = "guardian_groupobjectpermission"."group_id" )
>>        WHERE (("guardian_userobjectpermission"."object_pk" = '1015'  AND
>>      "guardian_userobjectpermission"."content_type_id" = 38 ) OR
>>      ("guardian_groupobjectpermission"."object_pk" = '1015'  AND
>>      "guardian_groupobjectpermission"."content_type_id" = 38 ) )
>>
>>      Is it the usual request ?
>>
>>      Thank you for your advices
>>      Hugo
>>
>>>      Hello Geonode community.
>>>
>>>      Usually if you want to retrieve OWS data from a geoserver instance
>>>      you can simply add your credentials before the dn name in the http
>>>      request (even if it is not a secure way), for exemple
>>>      |http://user:password@dn_site:8080/geoserver/<link to the service ex:wms?request=GetCapabilities>|
>>>      But it does not work with geonode
>>>      I guess it is because authentication has been delegated to geonode
>>>      proxy, doesn't it ?
>>>      how can I get through this, do I have to open a session  first and
>>>      then querying geoserver ?
>>>
>>>      I can't find it in the documentation.
>>>      Thank you for your advices.
>>>      Hugo FERRARI
>>>
>>>
>>>
>>>      Le 30/07/2015 17:18, geonode-users-request at lists.osgeo.org
>>>      <javascript:_e(%7B%7D,'cvml','geonode-users-request at lists.osgeo.org');>
>>>      a ?crit :
>>>>      Send geonode-users mailing list submissions to
>>>>      	geonode-users at lists.osgeo.org  <javascript:_e(%7B%7D,'cvml','geonode-users at lists.osgeo.org');>
>>>>
>>>>      To subscribe or unsubscribe via the World Wide Web, visit
>>>>      	http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>>>>      or, via email, send a message with subject or body 'help' to
>>>>      	geonode-users-request at lists.osgeo.org  <javascript:_e(%7B%7D,'cvml','geonode-users-request at lists.osgeo.org');>
>>>>
>>>>      You can reach the person managing the list at
>>>>      	geonode-users-owner at lists.osgeo.org  <javascript:_e(%7B%7D,'cvml','geonode-users-owner at lists.osgeo.org');>
>>>>
>>>>      When replying, please edit your Subject line so it is more specific
>>>>      than "Re: Contents of geonode-users digest..."
>>>>
>>>>
>>>>      Today's Topics:
>>>>
>>>>          1. Internal Server Error (Leonardo Jauregui)
>>>>          2. Re: Internal Server Error (Simone Dalmasso)
>>>>          3. need help resetting psql geonode password (Charles Coss?)
>>>>          4. Re: need help resetting psql geonode password (Paolo Corti)
>>>>          5. Re: Internal Server Error (Leonardo Jauregui)
>>>>          6. Re: Internal Server Error (Ariel Nunez)
>>>>
>>>>
>>>>      ----------------------------------------------------------------------
>>>>
>>>>      Message: 1
>>>>      Date: Wed, 29 Jul 2015 15:26:47 -0400
>>>>      From: Leonardo Jauregui<leojauregui.geog at gmail.com>  <javascript:_e(%7B%7D,'cvml','leojauregui.geog at gmail.com');>
>>>>      To:geonode-users at lists.osgeo.org  <javascript:_e(%7B%7D,'cvml','geonode-users at lists.osgeo.org');>
>>>>      Subject: [GeoNode-users] Internal Server Error
>>>>      Message-ID:
>>>>      	<CA+SjRdEzZ0i=ridubKvTh9DBKUxCpodfuNxb0hdA0sjBdNt3FA at mail.gmail.com>  <javascript:_e(%7B%7D,'cvml','CA%2BSjRdEzZ0i%5Cx3dridubKvTh9DBKUxCpodfuNxb0hdA0sjBdNt3FA at mail.gmail.com');>
>>>>      Content-Type: text/plain; charset="utf-8"
>>>>
>>>>      500
>>>>      Internal Server Error
>>>>
>>>>      that is the mesage after I installed geonode 2.4 un Ubuntu 14.04,
>>>>
>>>>        What is mising ?
>>>>
>>>>
>>>>      Leonardo from Bolivia
>>>>      -------------- next part --------------
>>>>      An HTML attachment was scrubbed...
>>>>      URL:<http://lists.osgeo.org/pipermail/geonode-users/attachments/20150729/8e1f78da/attachment-0001.html>  <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150729/8e1f78da/attachment-0001.html>
>>>>
>>>>      ------------------------------
>>>>
>>>>      Message: 2
>>>>      Date: Wed, 29 Jul 2015 21:40:27 +0200
>>>>      From: Simone Dalmasso<simone.dalmasso at gmail.com>  <javascript:_e(%7B%7D,'cvml','simone.dalmasso at gmail.com');>
>>>>      To: Leonardo Jauregui<leojauregui.geog at gmail.com>  <javascript:_e(%7B%7D,'cvml','leojauregui.geog at gmail.com');>
>>>>      Cc:"geonode-users at lists.osgeo.org"  <javascript:_e(%7B%7D,'cvml','geonode-users at lists.osgeo.org');>  <geonode-users at lists.osgeo.org>  <javascript:_e(%7B%7D,'cvml','geonode-users at lists.osgeo.org');>
>>>>      Subject: Re: [GeoNode-users] Internal Server Error
>>>>      Message-ID:
>>>>      	<CAAHAC+f2fUE0nMndb2R59GkgudiRjz+Hm6meYwoVqozYq2yH3A at mail.gmail.com>  <javascript:_e(%7B%7D,'cvml','CAAHAC%2Bf2fUE0nMndb2R59GkgudiRjz%2BHm6meYwoVqozYq2yH3A at mail.gmail.com');>
>>>>      Content-Type: text/plain; charset="utf-8"
>>>>
>>>>      Hi did you run the Geonode createduperuser and the geonode-updateip
>>>>      commands.
>>>>      If you take a look at the Apache error log you might get more info.
>>>>
>>>>      Il mercoled? 29 luglio 2015, Leonardo Jauregui<leojauregui.geog at gmail.com>  <javascript:_e(%7B%7D,'cvml','leojauregui.geog at gmail.com');>
>>>>      ha scritto:
>>>>
>>>>>      500
>>>>>      Internal Server Error
>>>>>
>>>>>      that is the mesage after I installed geonode 2.4 un Ubuntu 14.04,
>>>>>
>>>>>        What is mising ?
>>>>>
>>>>>
>>>>>      Leonardo from Bolivia
>>>>>
>>>>>
>>>>>
>>
>>
>> --
>> Simone
>>
>>
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 7 Aug 2015 15:57:09 +0200
> From: Paolo Corti <pcorti at gmail.com>
> To: Stefan Steiniger <sstein at geo.uzh.ch>
> Cc: geonode-users <geonode-users at lists.osgeo.org>
> Subject: Re: [GeoNode-users] view_layer slowing down
> Message-ID:
> 	<CAHXrU-LsLJYTZvDWE4rfLk4c8Toev8Mm1AFgGSpQZPvF47vLdA at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Fri, Aug 7, 2015 at 4:35 PM, Stefan Steiniger <sstein at geo.uzh.ch> wrote:
>> Hey Hugo,
>>
>> How many users do you have? And how many datasets (well, I guess layers in
>> this case, not docs)?
>>
>> I have only very few contributing users (4-5 at the moment), but the list of
>> people with login grows now (currently 45). Click on the "Layers" list view
>> is resolved in about 4 secs.
>> So I wonder from what size on one needs to to worry.
>> (though, I am on 2.0)
>>
>> ciao,
>> stefan
> my case: about 700 layers, about 200 users, still very very fast (with
> CLIENT_RESULTS_LIMIT = 10)
>
> By the way if you want to stress GeoNode and see hot it reacts, you
> may use this script:
> https://github.com/GeoNode/geonode/blob/master/scripts/misc/create_full_geonode_db.py
>
> regards
> p
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150810/0a2fdbf4/attachment-0001.html>


More information about the geonode-users mailing list