Hi Yang,
I'd try with more, but a priori it's not necessary.
I'm not sure the problem below (Transaction has timed ou) is related to memory.
The root cause seems to be
Caused by: java.sql.SQLTransactionRollbackException: A lock could not be
obtained within the time requested
You use Derby, right? Maybe you could try Postgres.
HTH
Jacques
Le 06/09/2024 à 09:52, 雷咩咩 a écrit :
hi Jacques,
Didn't change anything except must ones,
framework/catalina/ofbiz-component.xml change certificate path and password
framework/security/config/security.properties allowedProtocols add domain
framework/security/config/security.properties host-headers-allowed add domain
framework/base/config/cache.properties rm as the comment
is 1 core 2 GB memeroy os sufficient? I rarely operate the website and just let
it stay there...
Regards,
Yang
原始邮件
发件人:"Jacques Le Roux"< jacques.le.r...@les7arts.com >;
发件时间:2024/9/6 15:22
收件人:"dev"< d...@ofbiz.apache.org >;
主题:Re: 回复:Re: 回复:Re: ofibz causes system extremely slow after one night
What did you change exactly? I mean not only in cache.properties.
Also please rather send to the user ML. You are not developing OFBiz, you are
asking for help.
TIA
Jacques
Le 06/09/2024 à 02:56, 雷咩咩 a écrit :
> Bad news is the updated config only extended life span of ofbiz websites(and
also my system) to 2 days.
> today i see same issue again. only restarting os can solve.
>
>
> org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#login]:
org.apache.ofbiz.entity.transaction.GenericTransactionException: Roll back error (with no rollbackOnly cause found), could not commit transaction,
was rolled back instead: java.lang.Exception: Transaction has timed out (Transaction has timed out) (Roll back error (with no rollbackOnly cause
found), could not commit transaction, was rolled back instead: java.lang.Exception: Transaction has timed out (Transaction has timed out)) at
org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:176) ~[main/:?]
> ...
> at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
[tomcat-util-9.0.91.jar:9.0.91]
> at java.lang.Thread.run(Thread.java:840) [?:?]
> Caused by: org.apache.ofbiz.entity.transaction.GenericTransactionException: Roll back error (with no rollbackOnly cause found), could not commit
transaction, was rolled back instead: java.lang.Exception: Transaction has timed out (Transaction has timed out)
> at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:279)
~[main/:?]
> at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:233)
~[main/:?]
> at
org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:160)
~[main/:?]
> ... 40 more
> Caused by: java.lang.Exception: Transaction has timed out
> at
org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:266)
~[geronimo-transaction-3.1.5.jar:3.1.5]
> at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:263)
~[geronimo-transaction-3.1.5.jar:3.1.5]
> at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:250)
~[main/:?]
> at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:233)
~[main/:?]
> at
org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:160)
~[main/:?]
> ... 40 more
>
>
>
>
>
>
>
>
> Original Email
>
>
>
> From:"雷咩咩"< 675686...@qq.com >;
>
> Sent Time:2024/9/5 7:47
>
> To:"ofbiz user"< user@ofbiz.apache.org >;"dev"< d...@ofbiz.apache.org >;
>
> Subject:回复:Re: 回复:Re: ofibz causes system extremely slow after one night
>
>
>
>
>
>
>
> Good news is under this config ofbiz endured last night, will monitor more
few days.
>
>
>
> 原始邮件
>
>
>
> 发件人:"Jacques Le Roux"< jacques.le.r...@les7arts.com >;
>
> 发件时间:2024/9/4 15:36
>
> 收件人:"dev"< d...@ofbiz.apache.org >;"雷咩咩"< 675686...@qq.com.INVALID >;"ofbiz
user"< user@ofbiz.apache.org >;
>
> 主题:Re: 回复:Re: ofibz causes system extremely slow after one night
>
>
> Yes indeed
>
> Good day
>
> Le 04/09/2024 à 09:06, 雷咩咩 a écrit :
> > hi Jacques,
> >
> >
> > You mean framework\base\config\cache.properties, right?
> > I was not touching this file.
> > Just looked into, and found two possible section that 'can comment this out
or increase for better performance'
> >
> >
> > Do you mean proceed like this?
> >
> >
> > Regards,
> > Yang
> >
> >
> >
> >
> >
> >
> >
> > 原始邮件
> >
> >
> >
> > 发件人:"Jacques Le Roux"< jacques.le.r...@les7arts.com >;
> >
> > 发件时间:2024/9/4 14:36
> >
> > 收件人:"dev"< d...@ofbiz.apache.org >;
> >
> > 主题:Re: ofibz causes system extremely slow after one night
> >
> >
> > Hi Yang,
> >
> > Have you looked at cache.properties?
> >
> > HTH
> >
> > Jacques
> >
> > Le 04/09/2024 à 04:48, 雷咩咩 a écrit :
> > > Hi ofbiz users,
> > >
> > >
> > > I run ofbiz trunk with default configurations(jdk17, local derby) in my ubuntu. Within the 1 hour or so after starting it is just working
fine(most ui response in 1s). But after one night, when I try to access, the server seems to not respond, or repond only after very long time(as
long as 141s), and what's worse, causes my system very slow, even blocking my ssh login.If I run `pkill -f ofbiz` then the system is recovered and fast.
> > > Below is result of `top` command when this happens:
> > >
> > >
> > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+
COMMAND
> > > 85 root 20 0 0 0 0 S 2.4 0.0 4:31.32
kswapd0
> > > 9528 ci 20 0 3188120 386636 0 S 1.5 22.6 9:27.48
java
> > > 11612 root 20 0 260628 31332 3144 D 1.5 1.8 5:40.27
unattended-upgr
> > > 12081 root 20 0 1319708 9596 0 S 1.5 0.6 0:19.68
snapd
> > > 9645 ci 20 0 3294024 838056 0 S 1.2 48.9 8:10.07
java
> > > 83 root 0 -20 0 0 0 I 1.0 0.0 0:15.96
kworker/0:1H-kblockd
> > > 992 root 20 0 135468 10004 0 D 1.0 0.6 14:20.39
AliYunDunMonito
> > > 974 root 20 0 96968 2736 0 S 0.5 0.2 9:06.76
AliYunDun
> > > 674 root 20 0 685632 3156 0 S 0.2 0.2 1:56.29
aliyun-service
> > > 770 root 20 0 32216 888 0 S 0.2 0.1 1:28.89
AliYunDunUpdate
> > > 9498 ci 20 0 2150920 79592 0 S 0.2 4.6 1:11.93
java
> > >
> > >
> > > This issue happen every day, and many times I had to force reboot my OS
to solve, and is really painful.
> > >
> > >
> > > Could anyone help analyze what's wrong, is it my OS not meet system
requirements, or potential bug in ofbiz?
> > >
> > >
> > > I have uploaded my ofbiz logs athttps://leiyang.icu/ofbiz.trunk.slow.log
> > >
> > >
> > > Also copied some of the typical issue log lines:
> > >
> > >
> > > 2024-09-04 09:51:14,281 |jsse-nio-8443-exec-1 |ConfigXMLReader |I| controller loaded: 73.232s, 539 requests, 178 views
infile:/home/ci/g/ofbiz-framework/applications/product/webapp/catalog/WEB-INF/controller.xml2024-09-04 09:51:14,281 |jsse-nio-8443-exec-9
|ConfigXMLReader |I| controller loaded: 73.04s, 539 requests, 178 views
infile:/home/ci/g/ofbiz-framework/applications/product/webapp/catalog/WEB-INF/controller.xml
> > > 2024-09-04 09:51:41,583 |jsse-nio-8443-exec-4 |ConfigXMLReader |I| controller loaded: 53.201s, 539 requests, 178 views
infile:/home/ci/g/ofbiz-framework/applications/product/webapp/catalog/WEB-INF/controller.xml
> > > 2024-09-04 09:54:47,096 |jsse-nio-8443-exec-4 |ConfigXMLReader |I| controller loaded: 52.922s, 4 requests, 0 views
infile:/home/ci/g/ofbiz-framework/applications/commonext/webapp/WEB-INF/controller.xml
> > > 2024-09-04 09:54:48,200 |jsse-nio-8443-exec-4 |ConfigXMLReader |I| controller loaded: 141.023s, 539 requests, 178 views
infile:/home/ci/g/ofbiz-framework/applications/product/webapp/catalog/WEB-INF/controller.xml
> > > 2024-09-04 09:54:56,009 |sse-nio-8443-exec-18 |ConfigXMLReader
|I| controller lo
> > > aded: 63.708s, 51 requests, 22 views
infile:/home/ci/g/ofbiz-framework/framework/common/webcommon/WEB-INF/common-controller.xml
> > > 2024-09-04 09:55:44,106 |sse-nio-8443-exec-18 |ConfigXMLReader |I| controller loaded: 122.632s, 539 requests, 178 views
infile:/home/ci/g/ofbiz-framework/applications/product/webapp/catalog/WEB-INF/controller.xml
> > >
> > >
> > > 2024-09-04 09:01:36,440 |sse-nio-8443-exec-12 |TransactionUtil |W| In getSetRollbackOnlyCause no stack placeholder was in place,
here is the current location:
> > > java.lang.Exception: Current Stack Trace
> > > at
org.apache.ofbiz.entity.transaction.TransactionUtil.getSetRollbackOnlyCause(TransactionUtil.java:849)
[main/:?]
> > > at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:265)
[main/:?]
> > >
> > >
> > >
> > >
> > > 2024-09-04 09:01:36,632 |sse-nio-8443-exec-12 |ControlServlet
|E| Error in request handler:
> > > org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#login]:
org.apache.ofbiz.entity.transaction.GenericTransactionException: Roll back error (with no rollbackOnly cause found), could not commit transaction,
was rolled back instead: java.lang.Exception: Transaction has timed out (Transaction has timed out) (Roll back error (with no rollbackOnly cause
found), could not commit transaction, was rolled back instead: java.lang.Exception: Transaction has timed out (Transaction has timed out))
> > > at
org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:176)
~[main/:?]
> > > at
org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:147)
~[main/:?]
> > >
> > >
> > >
> > >
> > > at java.lang.Thread.run(Thread.java:840) [?:?]
> > > Caused by: org.apache.ofbiz.entity.transaction.GenericTransactionException: Roll back error (with no rollbackOnly cause found), could not
commit transaction, was rolled back instead: java.lang.Exception: Transaction has timed out (Transaction has timed out)
> > > at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:279)
~[main/:?]
> > > at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:233)
~[main/:?]
> > > at
org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:160)
~[main/:?]
> > > ... 41 more
> > > Caused by: java.lang.Exception: Transaction has timed out
> > > at
org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:266)
~[geronimo-transaction-3.1.5.jar:3.1.5]
> > > at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:263)
~[geronimo-transaction-3.1.5.jar:3.1.5]
> > > at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:250)
~[main/:?]
> > >
> > >
> > > Caused by: java.sql.SQLTransactionRollbackException: A lock could not be
obtained within the time requested
> > > at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
~[derby-10.14.2.0.jar:?]
> > > at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown
Source) ~[derby-10.14.2.0.jar:?]
> > >
> > >
> > >
> > >
> > >
> > > Regards,
> > > Yang