Re:回复:Re: 回复:Re: o fibz causes system extremely s low after one night

"雷咩咩" <[email protected]> Fri, 6 Sep 2024 08:56:11 +0800
Newsgroups gmane.comp.java.ofbiz.devel,gmane.comp.jakarta.jmeter.user
Message-ID <[email protected]>
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:"雷咩咩"< [email protected] &gt;;

Sent Time:2024/9/5 7:47

To:"ofbiz user"< [email protected] &gt;;"dev"< [email protected] &gt;;

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"< [email protected] &gt;;

发件时间:2024/9/4 15:36

收件人:"dev"< [email protected] &gt;;"雷咩咩"< [email protected] &gt;;"ofbiz user"< [email protected] &gt;;

主题:Re: 回复:Re: ofibz causes system extremely slow after one night


Yes indeed

Good day

Le 04/09/2024 à 09:06, 雷咩咩 a écrit&nbsp;:
&gt; hi&nbsp;Jacques,
&gt;
&gt;
&gt; You mean&nbsp;framework\base\config\cache.properties, right?
&gt; I was not touching this file.
&gt; Just looked into, and found two possible section that 'can comment this out or increase for better performance'
&gt;
&gt;
&gt; Do you mean proceed like this?
&gt;
&gt;
&gt; Regards,
&gt; Yang
&gt;
&gt;
&gt;
&gt;
&gt;
&gt;
&gt;                         
&gt; 原始邮件
&gt;                         
&gt;                       
&gt;
&gt; 发件人:"Jacques Le Roux"< [email protected] &gt;;
&gt;
&gt; 发件时间:2024/9/4 14:36
&gt;
&gt; 收件人:"dev"< [email protected] &gt;;
&gt;
&gt; 主题:Re: ofibz causes system extremely slow after one night
&gt;
&gt;
&gt; Hi Yang,
&gt;
&gt; Have you looked at cache.properties?
&gt;
&gt; HTH
&gt;
&gt; Jacques
&gt;
&gt; Le 04/09/2024 à 04:48, 雷咩咩 a écrit&nbsp;:
&gt; &gt; Hi ofbiz users,
&gt; &gt;
&gt; &gt;
&gt; &gt; 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.
&gt; &gt; Below is result of `top` command when this happens:
&gt; &gt;
&gt; &gt;
&gt; &gt; &nbsp; &nbsp; PID USER &nbsp; &nbsp; &nbsp;PR &nbsp;NI &nbsp; &nbsp;VIRT &nbsp; &nbsp;RES &nbsp; &nbsp;SHR S &nbsp;%CPU &nbsp;%MEM &nbsp; &nbsp; TIME+ COMMAND
&gt; &gt; &nbsp; &nbsp; &nbsp;85 root &nbsp; &nbsp; &nbsp;20 &nbsp; 0 &nbsp; &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp;0 S &nbsp; 2.4 &nbsp; 0.0 &nbsp; 4:31.32 kswapd0
&gt; &gt; &nbsp; &nbsp;9528 ci &nbsp; &nbsp; &nbsp; &nbsp;20 &nbsp; 0 3188120 386636 &nbsp; &nbsp; &nbsp;0 S &nbsp; 1.5 &nbsp;22.6 &nbsp; 9:27.48 java
&gt; &gt; &nbsp; 11612 root &nbsp; &nbsp; &nbsp;20 &nbsp; 0 &nbsp;260628 &nbsp;31332 &nbsp; 3144 D &nbsp; 1.5 &nbsp; 1.8 &nbsp; 5:40.27 unattended-upgr
&gt; &gt; &nbsp; 12081 root &nbsp; &nbsp; &nbsp;20 &nbsp; 0 1319708 &nbsp; 9596 &nbsp; &nbsp; &nbsp;0 S &nbsp; 1.5 &nbsp; 0.6 &nbsp; 0:19.68 snapd
&gt; &gt; &nbsp; &nbsp;9645 ci &nbsp; &nbsp; &nbsp; &nbsp;20 &nbsp; 0 3294024 838056 &nbsp; &nbsp; &nbsp;0 S &nbsp; 1.2 &nbsp;48.9 &nbsp; 8:10.07 java
&gt; &gt; &nbsp; &nbsp; &nbsp;83 root &nbsp; &nbsp; &nbsp; 0 -20 &nbsp; &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp;0 I &nbsp; 1.0 &nbsp; 0.0 &nbsp; 0:15.96 kworker/0:1H-kblockd
&gt; &gt; &nbsp; &nbsp; 992 root &nbsp; &nbsp; &nbsp;20 &nbsp; 0 &nbsp;135468 &nbsp;10004 &nbsp; &nbsp; &nbsp;0 D &nbsp; 1.0 &nbsp; 0.6 &nbsp;14:20.39 AliYunDunMonito
&gt; &gt; &nbsp; &nbsp; 974 root &nbsp; &nbsp; &nbsp;20 &nbsp; 0 &nbsp; 96968 &nbsp; 2736 &nbsp; &nbsp; &nbsp;0 S &nbsp; 0.5 &nbsp; 0.2 &nbsp; 9:06.76 AliYunDun
&gt; &gt; &nbsp; &nbsp; 674 root &nbsp; &nbsp; &nbsp;20 &nbsp; 0 &nbsp;685632 &nbsp; 3156 &nbsp; &nbsp; &nbsp;0 S &nbsp; 0.2 &nbsp; 0.2 &nbsp; 1:56.29 aliyun-service
&gt; &gt; &nbsp; &nbsp; 770 root &nbsp; &nbsp; &nbsp;20 &nbsp; 0 &nbsp; 32216 &nbsp; &nbsp;888 &nbsp; &nbsp; &nbsp;0 S &nbsp; 0.2 &nbsp; 0.1 &nbsp; 1:28.89 AliYunDunUpdate
&gt; &gt; &nbsp; &nbsp;9498 ci &nbsp; &nbsp; &nbsp; &nbsp;20 &nbsp; 0 2150920 &nbsp;79592 &nbsp; &nbsp; &nbsp;0 S &nbsp; 0.2 &nbsp; 4.6 &nbsp; 1:11.93 java
&gt; &gt;
&gt; &gt;
&gt; &gt; This issue happen every day, and many times I had to force reboot my OS to solve, and is really painful.
&gt; &gt;
&gt; &gt;
&gt; &gt; Could anyone help analyze what's wrong, is it my OS not meet system requirements, or potential bug in ofbiz?
&gt; &gt;
&gt; &gt;
&gt; &gt; I have uploaded my ofbiz logs athttps://leiyang.icu/ofbiz.trunk.slow.log
&gt; &gt;
&gt; &gt;
&gt; &gt; Also copied some of the typical issue log lines:
&gt; &gt;
&gt; &gt;
&gt; &gt; 2024-09-04 09:51:14,281 |jsse-nio-8443-exec-1 |ConfigXMLReader &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |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 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |I| controller loaded: 73.04s, 539 requests, 178 views infile:/home/ci/g/ofbiz-framework/applications/product/webapp/catalog/WEB-INF/controller.xml
&gt; &gt; 2024-09-04 09:51:41,583 |jsse-nio-8443-exec-4 |ConfigXMLReader &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |I| controller loaded: 53.201s, 539 requests, 178 views infile:/home/ci/g/ofbiz-framework/applications/product/webapp/catalog/WEB-INF/controller.xml
&gt; &gt; 2024-09-04 09:54:47,096 |jsse-nio-8443-exec-4 |ConfigXMLReader &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |I| controller loaded: 52.922s, 4 requests, 0 views infile:/home/ci/g/ofbiz-framework/applications/commonext/webapp/WEB-INF/controller.xml
&gt; &gt; 2024-09-04 09:54:48,200 |jsse-nio-8443-exec-4 |ConfigXMLReader &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |I| controller loaded: 141.023s, 539 requests, 178 views infile:/home/ci/g/ofbiz-framework/applications/product/webapp/catalog/WEB-INF/controller.xml
&gt; &gt; 2024-09-04 09:54:56,009 |sse-nio-8443-exec-18 |ConfigXMLReader &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |I| controller lo
&gt; &gt; aded: 63.708s, 51 requests, 22 views infile:/home/ci/g/ofbiz-framework/framework/common/webcommon/WEB-INF/common-controller.xml
&gt; &gt; 2024-09-04 09:55:44,106 |sse-nio-8443-exec-18 |ConfigXMLReader &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |I| controller loaded: 122.632s, 539 requests, 178 views infile:/home/ci/g/ofbiz-framework/applications/product/webapp/catalog/WEB-INF/controller.xml
&gt; &gt;
&gt; &gt;
&gt; &gt; 2024-09-04 09:01:36,440 |sse-nio-8443-exec-12 |TransactionUtil &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |W| In getSetRollbackOnlyCause no stack placeholder was in place, here is the current location:
&gt; &gt; java.lang.Exception: Current Stack Trace
&gt; &gt;       at org.apache.ofbiz.entity.transaction.TransactionUtil.getSetRollbackOnlyCause(TransactionUtil.java:849) [main/:?]
&gt; &gt;       at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:265) [main/:?]
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; 2024-09-04 09:01:36,632 |sse-nio-8443-exec-12 |ControlServlet &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|E| Error in request handler:
&gt; &gt; 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))
&gt; &gt;       at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:176) ~[main/:?]
&gt; &gt;       at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:147) ~[main/:?]
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;       at java.lang.Thread.run(Thread.java:840) [?:?]
&gt; &gt; 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)
&gt; &gt;       at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:279) ~[main/:?]
&gt; &gt;       at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:233) ~[main/:?]
&gt; &gt;       at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:160) ~[main/:?]
&gt; &gt;       ... 41 more
&gt; &gt; Caused by: java.lang.Exception: Transaction has timed out
&gt; &gt;       at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:266) ~[geronimo-transaction-3.1.5.jar:3.1.5]
&gt; &gt;       at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:263) ~[geronimo-transaction-3.1.5.jar:3.1.5]
&gt; &gt;       at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:250) ~[main/:?]
&gt; &gt;
&gt; &gt;
&gt; &gt; Caused by: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
&gt; &gt;       at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) ~[derby-10.14.2.0.jar:?]
&gt; &gt;       at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) ~[derby-10.14.2.0.jar:?]
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; Regards,
&gt; &gt; Yang