Very slow login in Servoy 5.2.2

Questions, answers, tips and ideas on Servoy Client

Very slow login in Servoy 5.2.2

Postby ionelioras » Tue Nov 23, 2010 5:21 pm

Hi everybody,

I migrated our Servoy application from 5.1.4 to 5.2.2. The database is still Sybase and the OS is Windows.
The login takes very long. I looked in the performance table from the Application Server and I saw a Repository SQL query that takes minimum 9 minutes(last time 10:14:594). In Servoy 5.1.4 everything worked well. The query is this:

Code: Select all
select e.object_uuid, sge.element_access, sge.group_id
from servoy_group_elements sge
inner join servoy_groups sg on sge.group_id=sg.group_id
inner join servoy_elements e on sge.element_id=e.element_id
inner join servoy_releases r on e.revision=r.revision and e.element_id=r.element_id
where ((sge.root_element_id = ? and r.release_number = ?) or[...]or (sge.root_element_id = ? and r.release_number = ?))
order by sge.element_id asc

Does anybody know when Servoy executes this query or why takes it so long?
Thank you!
Best regards, Ionel Ioras
Ionel Ioras
Stb Software Development
SAN Partner

Stb Software Development - http://www.stb-development.com
User avatar
ionelioras
 
Posts: 36
Joined: Mon Jun 01, 2009 9:49 am
Location: Timisoara, Romania

Re: Very slow login in Servoy 5.2.2

Postby Harjo » Wed Nov 24, 2010 12:53 am

We also saw this once, and yesterday, I got this report also from a third (servoy-development) company.


00000616.png
00000616.png (63.7 KiB) Viewed 4708 times


I will ask, if they filed an issue in the support system....
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4307
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Very slow login in Servoy 5.2.2

Postby martinh » Wed Nov 24, 2010 10:56 am

Harjo,

I've seen similar situations before, where 1 query took very long time.
Check your database and see if there is a page lock or table lock, which causes that the servoy query is waiting for the lock to be released.
If you kill this lock directly in your database and then you see that the query continues, then you have found the problem (that was my case)

And then find out why this page or table lock was there, because that is not always very evident.

Martin
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Very slow login in Servoy 5.2.2

Postby ionelioras » Wed Nov 24, 2010 1:00 pm

There were no locks in the login/start application process. But after using a fresh empty repository server and reimporting the solutions, this query takes now 47 ms.
Attachments
Repository_SQL.png
Repository_SQL.png (42.46 KiB) Viewed 4591 times
Ionel Ioras
Stb Software Development
SAN Partner

Stb Software Development - http://www.stb-development.com
User avatar
ionelioras
 
Posts: 36
Joined: Mon Jun 01, 2009 9:49 am
Location: Timisoara, Romania

Re: Very slow login in Servoy 5.2.2

Postby Harjo » Wed Nov 24, 2010 1:01 pm

Martin,

we had this every time we start the the server the first time!
so no clients yet, this is Servoy doing IMHO
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4307
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Very slow login in Servoy 5.2.2

Postby Harjo » Mon Dec 06, 2010 10:56 pm

This problem returns, even after setting up a new repository
We had this on our production-server and we replaced the the repository db, and all was fine, but now a few weeks later and a dozen releases further, this issue is back.

after every update we do, and than start a new client, Sybase is pumping for 10-15 minutes to 50%, all clients, are stalled & must wait before this process is finishing

I hope Servoy could take a look at this...
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4307
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Very slow login in Servoy 5.2.2

Postby msedita » Mon Dec 06, 2010 11:31 pm

Yes we have the same or a similar problem, after every update the first client login takes a long time, and the CPU utilization is very high.
Michael Sedita
MS Health Software Corp.
Developers of software solutions for behavioral healthcare and social service providers.
www.mshealth.com
User avatar
msedita
 
Posts: 224
Joined: Thu Dec 13, 2007 8:01 pm

Re: Very slow login in Servoy 5.2.2

Postby Harjo » Tue Dec 07, 2010 12:21 am

I can't find what is going on. I dont see a query that takes long in the servoy-performance tab :-(

will see what profiling Sybase will show me for info........
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4307
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Very slow login in Servoy 5.2.2

Postby Harjo » Tue Dec 07, 2010 1:12 am

oke, the profiling shows again, a very lengthy query:
Schermafbeelding 2010-12-07 om 00.06.57.png
Schermafbeelding 2010-12-07 om 00.06.57.png (17.78 KiB) Viewed 4484 times


select ep.element_id,ep.content_id,ep.property_value from servoy_releases as r,servoy_element_properties as ep where ep.revision = r.revision and ep.element_id = r.element_id and r.root_element_id = :p0 and r.release_number = :p1 order by ep.element_id asc,ep.content_id asc,ep.sequence asc

There is definitly something changed within Servoy, we never had this before......
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4307
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Very slow login in Servoy 5.2.2

Postby mboegem » Tue Dec 07, 2010 1:44 am

msedita wrote:Yes we have the same or a similar problem, after every update the first client login takes a long time, and the CPU utilization is very high.


+1, had this for longer time (also previous to 5.2.2) thought it was our solution, which is quite big, but as everyone suffers from this...
Fix would be nice, because now we have to take down our solution before updating, just to make sure no users login...
Although it's only a couple of minutes, it would be nice to not doing this... especially as it is one of the nice things about Servoy (when it works ;-) )
_____________________
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

Image
User avatar
mboegem
 
Posts: 1528
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Very slow login in Servoy 5.2.2

Postby msedita » Tue Dec 07, 2010 2:25 am

A couple of other observations. We have four servers running, all identical Amazon EC2 instances, identical solutions (but different database contents). One server takes much longer that then rest to process a solution update, and that is the one that also takes the longest to startup the first client. It is also the one in production longest, with the most cumulative updates. So I suspect that the more a solution is updated, the longer it takes to update further, and to start up.
Michael Sedita
MS Health Software Corp.
Developers of software solutions for behavioral healthcare and social service providers.
www.mshealth.com
User avatar
msedita
 
Posts: 224
Joined: Thu Dec 13, 2007 8:01 pm

Re: Very slow login in Servoy 5.2.2

Postby mboegem » Tue Dec 07, 2010 11:08 am

msedita wrote:A couple of other observations. We have four servers running, all identical Amazon EC2 instances, identical solutions (but different database contents). One server takes much longer that then rest to process a solution update, and that is the one that also takes the longest to startup the first client. It is also the one in production longest, with the most cumulative updates. So I suspect that the more a solution is updated, the longer it takes to update further, and to start up.


The more versions are stored in the repo, the longer the updates take. That's for sure.
Our solution has about 12 modules and I try to cleanup my repo (just create a fresh db file) every 15 updates.
Also the size of solutions seems to matter.

But even with a fresh repo file, I still have the startup issue.
_____________________
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

Image
User avatar
mboegem
 
Posts: 1528
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Very slow login in Servoy 5.2.2

Postby msedita » Tue Dec 07, 2010 6:31 pm

Question to mboegem - what do you mean by "create a fresh db file"? Do you mean replacing servoy_repository.db with a copy that has no data in any table?
Michael Sedita
MS Health Software Corp.
Developers of software solutions for behavioral healthcare and social service providers.
www.mshealth.com
User avatar
msedita
 
Posts: 224
Joined: Thu Dec 13, 2007 8:01 pm

Re: Very slow login in Servoy 5.2.2

Postby rgansevles » Tue Dec 07, 2010 6:47 pm

Hi,

There are 2 repository queries discussed here that are causing some delay in startup (or when a new solution is imported).

The one from Harjo is found to be an index in the servoy repository that interferes with another index resulting in a bad query execution plan for loading big solutions.
This index will be dropped in the Servoy 6 upgrade.

The other query from Ionel seems to have been fixed by creating a new repository.
If this query gets slower over time again, we will do more investigation in to that.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1899
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: Very slow login in Servoy 5.2.2

Postby Harjo » Tue Dec 07, 2010 7:24 pm

Rob, excellent work!

thanks for all the effort!!

ps for now we have manually removed the (troubling) index and starting a client after import is instant again! :D
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4307
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Next

Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 3 guests

cron