Application Login Page takes about 10 minutes to show up

Hello Support Team,

I am suffering from this issue, every time i restart the app server and open the default login page it takes around 10 minutes to show up, is this normal?


There are no such problems with normal CUBA application.

I’d recommend that you check what is wrong with your application using log files and a profiling tool (JVisualVM, JProfiler). Check the longest stage in deploy/tomcat/logs/app.log file using timestamps:

2018-07-12 16:36:10.505 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.CubaThreadPoolTaskScheduler - Initializing ExecutorService  'scheduler'
2018-07-12 16:36:11.868 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.jmx.MBeanExporter - Registering beans for JMX exposure: [app-portal.cuba:type=ThymeleafViewsCacheInvalidation]
2018-07-12 16:36:11.928 INFO  [localhost-startStop-1] com.haulmont.cuba.portal.sys.PortalDispatcherServlet - FrameworkServlet 'portal': initialization completed in 2048 ms

Then attach JVisualVM (for instance), check this guide.

Also, there is a known Linux issue with virtual machines in Cloud. You can resolve it using tomcat/bin/ file:

# Uncomment in case of slow startup on Linux VM

Thank you. I found out that the problem is with the awkward setup i have done for my VM. I was mapping a folder from my windows machine to an Ubuntu VM and put the project inside that folder, that was slowing down the deployment, I removed that mapping and now it takes around 10 to 15 sec for the home page to show up.

But now I had another issue after removing the folder mapping, it happens when i open the “Generate DB Scripts” screen in the studio, the following happens:

  • all the manual scripts suddenly showed up again in the updates tab as new.
  • I excluded them and moved them to manual scripts.
  • I clicked “Save and Close” and a notification showed up saying “Timer Already Cancelled”
  • then the project gets closed with an error message saying “Project ‘vp’ has been closed
    Reason: Directory ‘/home/tghonamy/projects/vp/modules/core/db/update-manually/postgres/18’ became inaccessible”, with 2 buttons “Reopen Project” and “Show project list”.
  • note that i am able to access the directory in the error message without problem from both the OS and InelliJ

I attached the error stack.error_stack.txt (43.7 KB)

When DB-scripts are excluded to manual scripts they are put to the “update-manually” sub-folder. Check is there anything?
It seems something went wrong during the files read/write, so the IllegalConcurrentAccessException occured.

When you work with a local storage, everything should be OK.
Please let us know if the problem persists and bring more details of your system and actions.


Thanks for your feedback, i am using Ubuntu 18.04 VM running from Oracle VM VirtualBox installed on Windows 10 Home Edition.
my issue didn’t get fully resolved, i didn’t get to the root cause, i tried many things like replicating the project in many places and opening it and for some reason still the exact same error happens when i open the generate DB scripts screen from either the SE or Browser editions. finally i followed the following steps to solve it:

  • deleting the update-manually dir.
  • opening the studio and going to generate DB manually screen.
  • marking all the scripts i excluded and this time i used the second exclusion option (remembering in settings.xml)
  • save and close, this time no error.

i have the following notes about this functionality in CUBA:

  • all the scripts i excluded was for 2 reasons:
    • reason 1: i wanted a unique constraint on multiple columns and i wanted the index to treat null columns included as unique value. for ex. (create unique index IDX_VP_PAYROLL_FRQUENCY_CONFIGURATION_UNQ on VP_PAYROLL_FRQUENCY_CONFIGURATION (COUNTRY_ID, COALESCE(SECTOR_ID, ‘00000000-0000-0000-0000-000000000000’)) ^
      and the studio insists every time i open the generate db scripts to drop the index i created manually.
    • reason 2: i wanted a Postgres exclusion constraint only to impose uniqueness on date ranges, and also the cuba insists to drop the index linked to that constraint.

i suggest to include in the studio support for this 2 cases.

Thanks for your support.