problem with import solution

Hi,

When I import certain solutions in Servoy server the import starts, but never ends.
(import in developer is no problem !)

When I start the import, I see that the Oracle database takes around 25% cpu and Java takes around 15 % ( windows task manager )
After a minute or so, java goes to 0 % and oracle takes 100% of 1 cpu.

Oracle stays on this 100% of 1 cpu and the import waits forever.
When I start another servoy admin page, I see the solutions and they seem to be imported. But after restarting the servoy server they are gone.

I looked at the sql that keeps Oracle on 100% and it is the following query :

select distinct s.root_element_id, s.active_release 
from servoy_element_properties ep, servoy_content_spec cs, servoy_root_elements s, servoy_releases r, servoy_elements e 
where cs.type_id = 10 
and ep.content_id = cs.content_id 
and ep.element_id = e.element_id 
and e.element_id = r.element_id 
and e.revision = r.revision 
and r.root_element_id = s.root_element_id 
and r.release_number = s.active_release

Any ideas ??

This happens in 5.2.9 and with both Oracle 10gr2 and Oracle 11gr2

I had the same issue with Oracle 10g (on AIX) at a customer with a freshly created repository. Servoy was essentially waiting for Oracle to complete a query but never got anything back. Oracle in turn was working like mad on something. Since I didn’t have full access to the box I couldn’t see what it was actually doing.
Due to time constraints I eventually asked the DBA to copy over the test repository database to the production environment. Subsequent imports now work fine.
I did file a case with Servoy under #417400.

Servoy 5.2.10
Oracle 10g

To one of the Servoyans :

Is the case that Robert mentioned fixed ?

I am realy getting into trouble when I can’t import the solutions.
We are moving to another server and I must be able to import !!

Thanks

Hi Hans,

The case is not fixed but is closed because they can’t reproduce it. I can reopen it again when I see this behavior again and have more info. Right now I haven’t seen this behavior anymore.
Perhaps you can give them more details on how to reproduce this issue (stack trace, etc.).

Additional info :

When the import is going into “hang” status, the servoy admin page dissapears. ( Internet Explorer cannot display the webpage )
When I do a refresh, the page is shown again and the solutions are there !!
But as I said before, Oracle is still on 100% and when I kill that session and restart the servoy server the solutions are “one”

More add. info :

I tried the same thing Robert did :

  1. delete the servoy repository ( oracle user ) of the servoy server with this problem
  2. export a repository from a testserver which had solutions (older versions) in it
  3. import this repository into the server server with the problem.
  4. after restarting the server I can see the “older” solutions
  5. now I delete all “older” solutions
  6. restart ( no solutions present)
  7. import the solutions that would not import previously
    And now I can import !!! (@@##)

I am looking for a bottle with certain fluids now ;-)
But seriously, does one of the Servoyans have an idea ???

I attached a small solution that would not load before.

The good news is that this really shows the power of the forum ( and Robert ;-) )

svy_nav_navigation.servoy (112 KB)

Hans,

Could it be that your repository had many solutions and that the ‘hanging’ query had a lot of data to search?

In that case just the recreate of a new repository data model will have been the fix.

The strange thing is that Robert had (possibly the same) issue with a fresh repo.

Rob

I am sure that it was an empty repository.

And after importing an existing repository and then deleting all solutions in there and of course restart
I was able to import again.

It looks to me it is an issue with an empty repository and some solutions ( like the one I attached in a previous entry).
Some solutions import without a problem !!
This is something that we rarely do, because we develop in developer and then import in production or test.
And those repositories where created some time ago ( around 5.2.1 (ish))

It happens in 5.2.8, 5.2.9, 5.2.10 and with Oracle 10.2.04,10.2.05 and 11.2.0.1.0.

Regards

Hi,

Tonight I had the same problem with an existing repository.

I replaced the repository with the one from the working server and I could import again.
I wonder if it could be an issue with the user/schema being “analyzed” : exec dbms_stats.gather_schema_stats

This would result in Oracle using the costbased optimizer instead of the rulebased optimizer.

I’ll do some testing with this in the coming days and get back here.

Regards,

Tonight I did a fresh install of Servoy on my laptop ( development version)

Again I had issues with performance on importing solutions in server and also I noticed that the startup of server was very slow with
very high cpu usage of the Oracle database.

I compared the repository of our production environment (which has no performance issues) with the repository on my laptop and found 1 BIG difference :

The number of records in the SERVOY_REVISION_HISTORY table

on my laptop ( after fresh install and importing our framework and solution only once ) there where more then 18000 records
on our production server ( on which we frequently import the framework and solution ) there where only 8 records

The startup time of servoy server on my laptop was several minutes and on our production server about 15 seconds

I deleted all records from the SERVOY_REVISION_HISTORY table and the startup time on my laptop went from several minutes to 10 seconds !!

Can one of the Servoyans comment on this, because I think that this is the cause of my slow import/startup problems.

addition : the table SERVOY_RELEASES also has more then 18000 rows

Regards,

Hans,

In Servoy 6 we have added an option to compact a solution, see the admin/solutions page.
It will delete all versions except the last one, this will clean up those bigtables.

Rob

Ok, nice.

But why are there over 18000 records after I create a new repository and import my solution for the first time ??
Is that normal ??

Regards,

The table servoy_releases contains an entry for each element in your solution.

Rob