Flushing solution

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Flushing solution

Postby sandigliano.gianni » Wed Aug 06, 2014 4:38 pm

I have a solution composed from N modules; it is deployed on a single PC.
In the past I have found issues after deploying a new version of the application; considering all issues found were always solved flushing the solution and its modules after deploying the new version, it became a standard for me to flush all modules componing the deployed application EVERYTIME it is updated!

Two questions:
1) On the Servoy manual/wiki flushing is required when:
"... the solution in the repository is modified in such a way that the Servoy Application Server is not aware of the changes. This is the case when the Servoy Application Server is started as Repository Server (see startRepositoryAsTeamProvider setting), allowing Servoy Developer to connect to the Servoy Application Server and update it."
What does it mean in practice the first sentence?
- When there are changes to the db structure used by the appl?
- When there are changes in the appl structure (new modules, new forms, new ???) ?
- When the Servoy repository is hosted on the same db as the application?
Could the perimeter of this context be defined more clearly, possibly with some examples?
2) Why the flushing operation is requiring sometimes 15-20 minutes with the PC doing almost nothing? And when this delay happen the first restart of that application after flushing is requiring often more than 5 minutes to have the first screen displayed? Is there something we can do to improve this behaviour reducing waiting time? Note that only the first restart is so slow, from the second on the application is normally starting in 2-3 seconds. The .servoy file deployed is about 4MB.

Thanks for any suggestion.

Ciao,
Gianni
sandigliano.gianni
 
Posts: 5
Joined: Fri May 03, 2013 2:27 pm

Re: Flushing solution

Postby Harjo » Wed Aug 06, 2014 6:20 pm

flushing was needed in the time the repository was also the develop repository. When you have a standalone application-server, flushing (should) be NEVER needed. After Servoy 6 we never used it anymore
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Flushing solution

Postby Andrei Costescu » Thu Aug 07, 2014 12:05 pm

It would be best to have a separate server for the repository - to make sure you data/logic and repository tables don't mix by mistake.

I suggest that you try to start over with an empty repository database. So fresh import.
Or delete the solution and it's modules once before import to see if that changes anything.

The times you mentioned for flush and first client start after flush seem much too high indeed. How many versions do you currently have on app. server for your solution/modules?

If after importing in a clean repository database it behaves the same way and you are able to provide the solution for testing then you should create a case and mention this forum topic in it as well.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Flushing solution

Postby sandigliano.gianni » Thu Aug 07, 2014 12:58 pm

Andrei Costescu wrote:It would be best to have a separate server for the repository - to make sure you data/logic and repository tables don't mix by mistake.

I suggest that you try to start over with an empty repository database. So fresh import.
Or delete the solution and it's modules once before import to see if that changes anything.

The times you mentioned for flush and first client start after flush seem much too high indeed. How many versions do you currently have on app. server for your solution/modules?

If after importing in a clean repository database it behaves the same way and you are able to provide the solution for testing then you should create a case and mention this forum topic in it as well.


Andrei,

thanks for your answer...thanks as well to Harjo.
For sure I will give a try to do not do a flush after an app upgrade in the coming months.

Generally speaking I need to understand if this could be considered a bug or not.
The customer involved is using the appl since 2005 moving through Servoy V3 > V3.5 > V5.1 > V5.2 where is still now...
The installation is still the old Servoy standard installation using iAnywhere as DBserver with separate db for repository and user data.
A proposal to migrate to Servoy V7 was already done but the customer prioritized application improvements to migration of base software.
The installation is a pure Servoy deploy environment, no development; few external plugins are used from IT2BE.

I should add the PC where the appl is running is a special edition: it is a Bloomberg Workstation, one of those PC able to retrieve financial information from Bloomberg via Internet. My application is interfacing a dedicated Excel spreadsheet where financial "tickers" are collected in an organized way; that spreadsheet to properly work need the base software installed on this workstation (Bloomberg + FinCAD).
What is special in a PC like this? Just the keyboard and the software running all the time...for the rest is a standard one [i5, quadcore, 4GB ram, LSI raid controller, RAID array of HD (No SSD...)]

Yesterday I was installing last improvements to the application when I noticed there were 28 version already in the repository. The 28th of these versions was installed about one month ago as a maintenance release.
I decided to cleanup the repository and restart from fresh.
First I deleted all previous versions for all applications as well as modules (I unfortunately forgot styles...)
Then I stopped and restarted both the Servoy Server and SQL Anywhere Server.
After restart I imported the full application with all its modules. All version numbers became 1 while 3 styles took version 29.
Then I flushed ALL and tried to restart the appl with NO success: the http://localhost:8080/servoy-client/ page opened, I clicked on the Servoy logo, the application opened taking the unusual long time of the first start...
I waited as long as 30 minutes then decided to do what I've always done in the past in this situation:
- brutally stopped with task manager the appl instance running.
- stopping servoy server and db server from windows services
- rebooting the machine
- checking both services were up'n running
- importing again as new version the appl software (they took versions 2 and 30 for styles)
- flushing all (it took more than 15 minutes to complete!)
- starting again the application for the first time after the upgrade (it took more than 5 minutes to start)
At this point the application begin to start as quick as usual (2-3 seconds).

I remember this behaviour consistent since Servoy 3.5 (Servoy < 3.5 was used for a short time...) but never had enough time to analyze it to decide if it is a bug or not...
There was a workaround so I survived not having a real issue for the end user.
Maybe we are able to complete the screening now!

Some more details:
- With each new Servoy version I started from fresh in a new directory with fresh databases always on iAnywhere
- Within the same Servoy version I never tried to switch the repository to a really new database freshly created; I always reused the same original db just deleting old appl versions and installing last version available.

Do you need any more informations?
Should I consider it a bug and open a case for it?

Ciao,
GIanni
sandigliano.gianni
 
Posts: 5
Joined: Fri May 03, 2013 2:27 pm

Re: Flushing solution

Postby Andrei Costescu » Thu Aug 07, 2014 1:21 pm

If the problem would be on Servoy 7 I would say create a case with sample solution.
But as the problem is on Servoy 5... You could still try to do the same import on a Servoy 7 Server just to see what happens and if it still reproduces - and then create a case for 7 if it's still there.

The only other idea left for 5 is to really wipe-out the repository database or use a new one and start fresh.
But if, when you migrated to 5 from previous version - and you had a clean repo - it still took this long then it's probably not the cause.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Flushing solution

Postby sandigliano.gianni » Thu Aug 07, 2014 3:13 pm

So, it's probably a bug but it needs to be verified on latest Servoy version...
Right?

Gianni
sandigliano.gianni
 
Posts: 5
Joined: Fri May 03, 2013 2:27 pm

Re: Flushing solution

Postby Andrei Costescu » Thu Aug 07, 2014 3:49 pm

Yes, it could be a bug. And it would be nice to verify it against v7.
Normally you import a solution, it doesn't take that long and it works directly. You don't need flush and you don't wait 5 min for first client to start.

Do you have import hooks defined for that solution? If so do you use DB transactions/locks in them? Those could affect the import process as well - so I can't say it's a bug for sure :)
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Flushing solution

Postby sandigliano.gianni » Thu Aug 07, 2014 6:44 pm

Andrei,

what exactly do you mean as "import hooks"?

I do NOT import any data...NEVER...nor I pretend during an import to execute whatever as side process to implement for example an automatic db update (Sincerly I do not know how to do it automatically and if it is possible within a Servoy import ...).

Maybe I am missing something here?

Gianni
sandigliano.gianni
 
Posts: 5
Joined: Fri May 03, 2013 2:27 pm

Re: Flushing solution

Postby Andrei Costescu » Fri Aug 08, 2014 10:18 am

I think import hooks were first added in 5.0, and in following versions there were some changes/fixes in that area.

Here is a 5.2 wiki page about them: Import hooks on wiki.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Flushing solution

Postby sandigliano.gianni » Fri Aug 08, 2014 11:41 am

Andrei Costescu wrote:...
Here is a 5.2 wiki page about them: Import hooks on wiki.


Thanks Andrei,

I didn't focus on this new functionality before and while in 5.2 was still in early stages, in Servoy 7 should be more consistent...
Another good reason to move to Servoy 7!

Gianni
sandigliano.gianni
 
Posts: 5
Joined: Fri May 03, 2013 2:27 pm


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 3 guests