Website run really slow on my development

Hello everyone,

I’m Nam. I’m searching the WMS system and i founded openboxes. This is really great website to build for the bussiness.
But i have a problem related performance when i installed it on my PC, When i navigate in the menu, each page cost me ~ 16 - 50 seconds to load. ( I have PC in SSD and running with 16GB memory )

Do you have any idea to solve the performance issue,

2020-12-31 01:47:44,080 [http-8080-3] INFO filters.AccessLogFilters - Request duration for (product/edit): 22ms/52844ms
2020-12-31 01:47:46,609 [http-8080-3] INFO filters.AccessLogFilters - dashboard.megamenu: [user:admin, location:Boston Headquarters]
2020-12-31 01:47:46,654 [http-8080-3] INFO requisition.RequisitionService - destination Boston Headquarters
2020-12-31 01:47:58,471 [http-8080-3] INFO filters.AccessLogFilters - Request duration for (dashboard/megamenu): 99ms/11753ms

Thanks in advance,
Nam

Whoa that’s unreal. My guess is that it’s an issue with the memory allocated to Tomcat. Can you show me the output for the following command:

ps -ef | grep tomcat

If you’re on Windows open powershell

Get-Process

Post the output here.

Hello jmiranda,

Thank you for fast reply. Currently i’m running the website in my development. For easily i build a docker and with 2 containers ( Mysql + Openboxes (with java, tomcat …) ). And i’m running it with command :
“grails run-app”

When i create other website it running normally. But really slow with openboxes.
And further point that if i running without any products it will run faster. When i import more than 1000 products it will run very slow.

Do you think i need add some config, something like cache , etc … ?

Thank you Jmiranda

For easily i build a docker and with 2 containers ( Mysql + Openboxes (with java, tomcat …) ).

Ok, interesting. Can you provide more details about how you’re running the docker containers?

And i’m running it with command : “grails run-app”

Are you executing grails run-app in a container? Can you explain how you do this if it’s different from the response to the question above?

When i create other website it running normally.

Can you explain what you mean by this?

Do you think i need add some config, something like cache , etc … ?

The only thing I can think of right now is that you’re running Grails with such little memory allocated to the process that it’s unable to process the request. Another issue might be with the network by which the two containers are communicating. And one other issue might be the volume used for the MySQL container.

I’m not a Docker expert but if you give me enough details to reproduce, I can probably troubleshoot.

Hi Justin,

Yes i’m agree with you that docker only make us build the environment easier, but i’m sure that openboxes code have some issue related speed performance.

  • About your 1 question : I running a docker base on the guide in this URL : https://github.com/openboxes/openboxes-docker

  • About question 2 : Yes i run the grails run-app inside the openboxes container -> After run this command, it will starting to build the react bundle, start the grails server as well, it will take about 4-5 minutes to finish.

  • When i create other website it running normally.
    => This mean when i develop some other website, it run very fast, not like the current openboxes for now :smiley:

=> About the performance, i already tried build a tomcat server and see it run quite faster. But i think it still have some performance issue here. When it run each page at the first time, it will run very slow. Then in the next request, it has cached and it run faster. When i take a look at the log, i see the time it generated the mega menu very slow. I’m really not very familiar with groovy so i don’t know how to fix that issue, and hope you can fix it some days soon.
In the mega menu, it call a lot of message like this :
<warehouse:message code="default.create.label" args="[warehouse.message(code: 'requisitions.label')]" />

Sorry but further question :

  • In the official openboxes, I can’t see any document to introduce about the business guide. So when i go to the demo, i don’t know about all steps need to do, i don’t know which is the first step and what is the final step need to do.

Example like Putaway step, i can’t create a putaway because the list always show “Not rows found”, i checked, seem like the Putaway need the Order Transfer, but i don’t know how to create that Order with that status.

Can you help me
Thank you

I was aware of this issue. This is due to the fact that OpenBoxes requires a lot of dependencies (Grails/Ivy and node dependencies). I haven’t looked into a solution but assumed during development it might be best to mount node_modules and the .ivy directories to avoid the costly re-downloading of all dependencies.

A quick google search turned up this article on stackoverflow. Not sure if it answers the question but it’s a start.

We use NewRelic to help us identify performance issues. But the performance issues that we’ve encounter don’t add 10s of seconds to response times. So this is mostly Docker so I’d recommend not using Docker in development until we figure out what’s causing the issue.

What OS version are you using in development?
What version / branch of OpenBoxes are you using?

Yes good observation. The megamenu takes a second or two on first the request then is cached. But I don’t think the message taglib has much to do with that. With that said the data retrieved by the message tag lib should also be cached. I’ve tried to configure these localization messages to be cached but haven’t had much luck. You can disable the database query associated with this and just use the default message store (messages.properties) but I don’t suspect this will provide much of a gain.

But please add a GitHub issue to investigate this further if you feel it is a big issue.

Apologies for this. We’ve been trying to add tutorial videos for new features but perhaps Putaway was neglected. Documentation is a slow evolving process and we have not put enough energy into it over the past year or two.

However we are starting a documentation push (with funding!) in January so we hope the docs will be more sufficient very soon.You can read more about that initiative here. Please add your feedback and requirements to that discussion.

Wow, thank you Justin, you are very kind to answer all my questions :smiley:

About the performance, it was fixed when i increase the the heap and perm size by this

GRAILS_OPTS: "-XX:MaxPermSize=1024m -Xmx2048m -Xms1024m  -server"

And now the site run very faster than before :smiling_face_with_three_hearts:

About the document, that is great news when hear from you. Hope we have the full document to use this app soon. And i will take a look into your URL.

Thank you very much Justin, HAPPY NEW YEAR !!!

And one more question : This openboxes app running in very old version JAVA + Grails. So do you think it will have some issue in the future.
And do you think the app will be upgrade any time soon ? And is it hard to upgrade (Java + Grails ) version ?

And now the site run very faster than before

Oh nice. Glad you solved it.

This openboxes app running in very old version JAVA + Grails. So do you think it will have some issue in the future.

We’re already running into issues with Java 7 being EOL’d. And later versions of Tomcat not running unless we are using Java 7. But luckily there’s still support for Java 7 out there like Azul (https://www.azul.com/downloads/zulu-community/?package=jdk) so that buys us some time.

And do you think the app will be upgrade any time soon ?

We’ve been working on an upgrade to Grails 3 since 2019. That project stalled in August 2020 but we’re going to be picking it up again in the new year. You can see the current state at the link below

And is it hard to upgrade (Java + Grails ) version?

No it’s pretty straightforward. We’ve been working on the upgrade on/off since 2014 when we attempted to upgrade to Grails 2.5.

At this rate it shouldn’t take much longer … we’re hoping to have it done by 2030.

Kidding.

The upgrade itself is not all that difficult (it took about 3-6 months both times). But stabilizing the app, refactoring to deal with broken plugins and dependencies and fixing the regressions created by the upgrade is time consuming. And unfortunately we haven’t had any funding for this so it’s basically me working on it part-time when I find time.

Thankfully we have some funding moving forward so we’re hiring a developer to help out. As soon as we get started again I’m hoping to be done within next 3-6 months. Here’s the job description if anyone is interested. We have a few good candidates already but I won’t be making a final decision until next week.