Thanks for the detailed report. The guardian shortcuts are the pieces of code that we are looking at and may need to be overridden in Geonode in order to be less generic but more efficient. In particular the get_users_with_perms and get_objects_for_user. <div><br></div><div>No need for a ticket then. Glad you solved. <br><br> Ciao!<span></span><br>Il lunedì 10 agosto 2015, FERRARI Hugo <<a href="mailto:ferrari_hugo@yahoo.fr">ferrari_hugo@yahoo.fr</a>> ha scritto:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>hello<br>
<br>
I think the issue came from my geonode instance, as I had to
modify it.<br>
I resolved my issue, now the responding time is as fast as in the
begining.<br>
I'm sorry if I make you loose time.<br>
I you want explanations, here it is:<br>
<br>
I had to change the permission management system, <br>
because the society I work for wanted to display the whole catalog
first, before verifying if the current user can see the resource
detail.<br>
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).<br>
then if you click on a snippet you ll have a custom
detail_resource template .<br>
<br>
Why this change made my geonode being so slow ?<br>
When building the view for the resource detail ,<br>
a context_dict with few infos on the resource is added to the
response (<a href="https://github.com/GeoNode/geonode/blob/418927a1e321674164ebae0d91825a3ce20b12ec/geonode/layers/views.py#L272" target="_blank">see
the code</a>)<br>
<b>_perms_info_json</b> is called from the security view. <br>
if you want the traceback, the "top level call" comes from<b> </b><b><b><br>
security.models.</b>get_all_level_info </b><br>
<b>get_users_with_perms</b> is the guardian shortcut which takes
at least five second to be executed, because it makes the query I
report from postgres log.<br>
<br>
I replaced the call to _perms_info_json by an empty dict as I
didn't need it anymore.<br>
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.<br>
<br>
I hope it was clear,<br>
Do I have to create a new ticket as it may come from my instance ?<br>
thanks again,<br>
Hugo<br>
<br>
<br>
Le 07/08/2015 23:00, <a href="javascript:_e(%7B%7D,'cvml','geonode-users-request@lists.osgeo.org');" target="_blank">geonode-users-request@lists.osgeo.org</a> a
écrit :<br>
</div>
<blockquote type="cite">
<pre>Send geonode-users mailing list submissions to
<a href="javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');" target="_blank">geonode-users@lists.osgeo.org</a>
To subscribe or unsubscribe via the World Wide Web, visit
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users</a>
or, via email, send a message with subject or body 'help' to
<a href="javascript:_e(%7B%7D,'cvml','geonode-users-request@lists.osgeo.org');" target="_blank">geonode-users-request@lists.osgeo.org</a>
You can reach the person managing the list at
<a href="javascript:_e(%7B%7D,'cvml','geonode-users-owner@lists.osgeo.org');" target="_blank">geonode-users-owner@lists.osgeo.org</a>
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" <a href="javascript:_e(%7B%7D,'cvml','sstein@geo.uzh.ch');" target="_blank"><sstein@geo.uzh.ch></a>
To: <a href="javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');" target="_blank">geonode-users@lists.osgeo.org</a>
Subject: Re: [GeoNode-users] view_layer slowing down
Message-ID: <a href="javascript:_e(%7B%7D,'cvml','55C4C222.40703@geo.uzh.ch');" target="_blank"><55C4C222.40703@geo.uzh.ch></a>
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:
</pre>
<blockquote type="cite">
<pre>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 <<a href="javascript:_e(%7B%7D,'cvml','ferrari_hugo@yahoo.fr');" target="_blank">ferrari_hugo@yahoo.fr</a>
<a href="javascript:_e(%7B%7D,'cvml','ferrari_hugo@yahoo.fr');" target="_blank"><mailto:ferrari_hugo@yahoo.fr></a>> 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
</pre>
<blockquote type="cite">
<pre> 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
|<a href="http://user:password@dn_site:8080/geoserver/" target="_blank">http://user:password@dn_site:8080/geoserver/</a><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, <a href="javascript:_e(%7B%7D,'cvml','geonode-users-request@lists.osgeo.org');" target="_blank">geonode-users-request@lists.osgeo.org</a>
<a><javascript:_e(%7B%7D,'cvml','geonode-users-request@lists.osgeo.org');></a>
a ?crit :
</pre>
<blockquote type="cite">
<pre> Send geonode-users mailing list submissions to
<a href="javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');" target="_blank">geonode-users@lists.osgeo.org</a> <a><javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');></a>
To subscribe or unsubscribe via the World Wide Web, visit
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users</a>
or, via email, send a message with subject or body 'help' to
<a href="javascript:_e(%7B%7D,'cvml','geonode-users-request@lists.osgeo.org');" target="_blank">geonode-users-request@lists.osgeo.org</a> <a><javascript:_e(%7B%7D,'cvml','geonode-users-request@lists.osgeo.org');></a>
You can reach the person managing the list at
<a href="javascript:_e(%7B%7D,'cvml','geonode-users-owner@lists.osgeo.org');" target="_blank">geonode-users-owner@lists.osgeo.org</a> <a><javascript:_e(%7B%7D,'cvml','geonode-users-owner@lists.osgeo.org');></a>
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<a href="javascript:_e(%7B%7D,'cvml','leojauregui.geog@gmail.com');" target="_blank"><leojauregui.geog@gmail.com></a> <a><javascript:_e(%7B%7D,'cvml','leojauregui.geog@gmail.com');></a>
<a href="javascript:_e(%7B%7D,'cvml','To:geonode-users@lists.osgeo.org');" target="_blank">To:geonode-users@lists.osgeo.org</a> <a><javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');></a>
Subject: [GeoNode-users] Internal Server Error
Message-ID:
<a href="javascript:_e(%7B%7D,'cvml','CA%2BSjRdEzZ0i%5Cx3dridubKvTh9DBKUxCpodfuNxb0hdA0sjBdNt3FA@mail.gmail.com');" target="_blank"><CA+SjRdEzZ0i=ridubKvTh9DBKUxCpodfuNxb0hdA0sjBdNt3FA@mail.gmail.com></a> <a><javascript:_e(%7B%7D,'cvml','CA%2BSjRdEzZ0i%5Cx3dridubKvTh9DBKUxCpodfuNxb0hdA0sjBdNt3FA@mail.gmail.com');></a>
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:<a href="http://lists.osgeo.org/pipermail/geonode-users/attachments/20150729/8e1f78da/attachment-0001.html" target="_blank"><http://lists.osgeo.org/pipermail/geonode-users/attachments/20150729/8e1f78da/attachment-0001.html></a> <a href="http://lists.osgeo.org/pipermail/geonode-users/attachments/20150729/8e1f78da/attachment-0001.html" target="_blank"><http://lists.osgeo.org/pipermail/geonode-users/attachments/20150729/8e1f78da/attachment-0001.html></a>
------------------------------
Message: 2
Date: Wed, 29 Jul 2015 21:40:27 +0200
From: Simone Dalmasso<a href="javascript:_e(%7B%7D,'cvml','simone.dalmasso@gmail.com');" target="_blank"><simone.dalmasso@gmail.com></a> <a><javascript:_e(%7B%7D,'cvml','simone.dalmasso@gmail.com');></a>
To: Leonardo Jauregui<a href="javascript:_e(%7B%7D,'cvml','leojauregui.geog@gmail.com');" target="_blank"><leojauregui.geog@gmail.com></a> <a><javascript:_e(%7B%7D,'cvml','leojauregui.geog@gmail.com');></a>
Cc:<a href="javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');" target="_blank">"geonode-users@lists.osgeo.org"</a> <a><javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');></a> <a href="javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');" target="_blank"><geonode-users@lists.osgeo.org></a> <a><javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');></a>
Subject: Re: [GeoNode-users] Internal Server Error
Message-ID:
<a href="javascript:_e(%7B%7D,'cvml','CAAHAC%2Bf2fUE0nMndb2R59GkgudiRjz%2BHm6meYwoVqozYq2yH3A@mail.gmail.com');" target="_blank"><CAAHAC+f2fUE0nMndb2R59GkgudiRjz+Hm6meYwoVqozYq2yH3A@mail.gmail.com></a> <a><javascript:_e(%7B%7D,'cvml','CAAHAC%2Bf2fUE0nMndb2R59GkgudiRjz%2BHm6meYwoVqozYq2yH3A@mail.gmail.com');></a>
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<a href="javascript:_e(%7B%7D,'cvml','leojauregui.geog@gmail.com');" target="_blank"><leojauregui.geog@gmail.com></a> <a><javascript:_e(%7B%7D,'cvml','leojauregui.geog@gmail.com');></a>
ha scritto:
</pre>
<blockquote type="cite">
<pre> 500
Internal Server Error
that is the mesage after I installed geonode 2.4 un Ubuntu 14.04,
What is mising ?
Leonardo from Bolivia
</pre>
</blockquote>
</blockquote>
<pre></pre>
</blockquote>
<pre>
--
Simone
_______________________________________________
geonode-users mailing list
<a href="javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');" target="_blank">geonode-users@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users</a>
</pre>
</blockquote>
<pre>
------------------------------
Message: 2
Date: Fri, 7 Aug 2015 15:57:09 +0200
From: Paolo Corti <a href="javascript:_e(%7B%7D,'cvml','pcorti@gmail.com');" target="_blank"><pcorti@gmail.com></a>
To: Stefan Steiniger <a href="javascript:_e(%7B%7D,'cvml','sstein@geo.uzh.ch');" target="_blank"><sstein@geo.uzh.ch></a>
Cc: geonode-users <a href="javascript:_e(%7B%7D,'cvml','geonode-users@lists.osgeo.org');" target="_blank"><geonode-users@lists.osgeo.org></a>
Subject: Re: [GeoNode-users] view_layer slowing down
Message-ID:
<a href="javascript:_e(%7B%7D,'cvml','CAHXrU-LsLJYTZvDWE4rfLk4c8Toev8Mm1AFgGSpQZPvF47vLdA@mail.gmail.com');" target="_blank"><CAHXrU-LsLJYTZvDWE4rfLk4c8Toev8Mm1AFgGSpQZPvF47vLdA@mail.gmail.com></a>
Content-Type: text/plain; charset=UTF-8
On Fri, Aug 7, 2015 at 4:35 PM, Stefan Steiniger <a href="javascript:_e(%7B%7D,'cvml','sstein@geo.uzh.ch');" target="_blank"><sstein@geo.uzh.ch></a> wrote:
</pre>
<blockquote type="cite">
<pre>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
</pre>
</blockquote>
<pre>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:
<a href="https://github.com/GeoNode/geonode/blob/master/scripts/misc/create_full_geonode_db.py" target="_blank">https://github.com/GeoNode/geonode/blob/master/scripts/misc/create_full_geonode_db.py</a>
regards
p
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br><br>-- <br>Simone <br>