You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@answer.apache.org by "brocaar (via GitHub)" <gi...@apache.org> on 2026/02/02 10:52:54 UTC

[I] Answer process jumps to ~ 99% CPU usage [answer]

brocaar opened a new issue, #1493:
URL: https://github.com/apache/answer/issues/1493

   ## Describe the bug
   
   After leaving Answer for some time (days?) running, the CPU usage jumps and stays at around 99%, even when it is not serving any requests. The web-interface is still responsive enough to keep it functional, but after a restart (I have to kill the process) it hardly consumes any CPU.
   
   ## To Reproduce
   
   I'm not sure how to reproduce / trigger this. It happens after a couple of days running. I noticed web-requests take slightly longer and I inspected the CPU usage. This already happened a few times in a row.
   
   ## Expected behavior
   
   CPU usage stays stable.
   
   ## Logs
   
   ```
   Feb 02 10:32:48 chirpstack-support answer[2067003]: 2026-02-02 10:32:48.045        ERROR        activity_common/vote.go:60        pq: invalid input syntax for type bigint: ""
   Feb 02 10:32:48 chirpstack-support answer[2067003]: 2026-02-02 10:32:48.288        ERROR        activity_common/vote.go:60        pq: invalid input syntax for type bigint: ""
   Feb 02 10:32:48 chirpstack-support answer[2067003]: 2026-02-02 10:32:48.429        ERROR        activity_common/vote.go:60        pq: invalid input syntax for type bigint: ""
   Feb 02 10:36:25 chirpstack-support answer[2067003]: 2026-02-02 10:36:25.605        ERROR        activity_common/vote.go:60        pq: invalid input syntax for type bigint: ""
   Feb 02 10:36:25 chirpstack-support answer[2067003]: 2026-02-02 10:36:25.767        ERROR        activity_common/vote.go:60        pq: invalid input syntax for type bigint: ""
   Feb 02 10:40:00 chirpstack-support answer[2067003]: 2026-02-02 10:40:00.025        INFO        cron/cron.go:88        checking expired user suspensions
   Feb 02 10:45:16 chirpstack-support answer[2067003]: 2026-02-02 10:45:16.946        ERROR        activity_common/vote.go:60        pq: invalid input syntax for type bigint: ""
   Feb 02 10:45:31 chirpstack-support answer[2067003]: 2026-02-02 10:45:31.729        ERROR        activity_common/vote.go:60        pq: invalid input syntax for type bigint: ""
   Feb 02 10:45:31 chirpstack-support answer[2067003]: 2026-02-02 10:45:31.870        ERROR        activity_common/vote.go:60        pq: invalid input syntax for type bigint: ""
   Feb 02 10:45:32 chirpstack-support answer[2067003]: 2026-02-02 10:45:32.032        ERROR        activity_common/vote.go:60        pq: invalid input syntax for type bigint: ""
   ```
   
   There is nothing special in the logs. I will restart the process with `LOG_LEVEL=DEBUG` to gather more log-output.
   
   ## Platform
   
   - OS: Linux AMD64
   - Version: v1.7.1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "brocaar (via GitHub)" <gi...@apache.org>.
brocaar commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3852095966

   @LinkinStars , could you confirm the steps for this?
   
   Should I follow these steps first:
   https://github.com/apache/answer?tab=readme-ov-file#build
   
   And then using that binary execute `./answer build ....` to build the binary with plugins? Or is there also an option to include the plugins directly when building from source?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3875899105

   > I'm rolling back, because this version breaks every page.....
   > 
   > <img alt="Image" width="2000" height="1704" src="https://private-user-images.githubusercontent.com/165497/547003474-1122cf8d-69f9-4a32-8430-8f939d121444.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzA3MDkzNDYsIm5iZiI6MTc3MDcwOTA0NiwicGF0aCI6Ii8xNjU0OTcvNTQ3MDAzNDc0LTExMjJjZjhkLTY5ZjktNGEzMi04NDMwLThmOTM5ZDEyMTQ0NC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDIxMFQwNzM3MjZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yNzNmMDI2OWMxY2QzOTZjMjk3NWQyMzEzMDc2ZTZkYWFkNTU1NWRiNTk3ZjVmOWMxYTdkMWY1MTRlMGEwMGMzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.YBKF0OstyRTv1VXY1js1iRyPGonkvEMa-dRNA977xjE">
   > ```
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: 2026-02-09 09:19:05.213        ERROR        handler/handler.go:53        code: 500, reason: base.database_error, message: , error: pq: invalid input syntax for type bigint: "null"
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/apache/answer/internal/repo/comment/comment_repo.go:112 github.com/apache/answer/internal/repo/comment.(*commentRepo).GetComment
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/apache/answer/internal/service/comment/comment_service.go:399 github.com/apache/answer/internal/service/comment.(*CommentService).GetCommentWithPage
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/apache/answer/internal/controller/comment_controller.go:261 github.com/apache/answer/internal/controller.(*CommentController).GetCommentWithPage
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/apache/answer/internal/base/middleware/auth.go:88 github.com/apache/answer/internal/base/server.NewHTTPServer.(*AuthUserMiddleware).EjectUserBySiteInfo.func9
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/apache/answer/internal/base/middleware/auth.go:75 github.com/apache/answer/internal/base/server.NewHTTPServer.(*AuthUserMiddleware).Auth.func8
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/anargu/gin-brotli/gin_brotli.go:71 github.com/apache/answer/internal/base/server.NewHTTPServer.Brotli.func3
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/gin.go:633 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/gin.go:589 github.com/gin-gonic/gin.(*Engine).ServeHTTP
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /nix/store/4wc5q32wgrhac7vb4da1zclhvw7r01wx-go-1.25.5/share/go/src/net/http/server.go:3340 net/http.serverHandler.ServeHTTP
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /nix/store/4wc5q32wgrhac7vb4da1zclhvw7r01wx-go-1.25.5/share/go/src/net/http/server.go:2109 net/http.(*conn).serve
   > Feb 09 09:19:05 chirpstack-support answer[2218476]: /nix/store/4wc5q32wgrhac7vb4da1zclhvw7r01wx-go-1.25.5/share/go/src/runtime/asm_amd64.s:1693 runtime.goexit
   > ```
   
   👍 Thank you for your feedback. We have made a fix. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "brocaar (via GitHub)" <gi...@apache.org>.
brocaar commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3839971859

   @LinkinStars it is back at 99% CPU. However, I can not find anything in the logs that might point to the cause....
   
   The only additional logs I see with `DEBUG` are:
   
   ```
   DEBUG        router/ui.go:68        open static path build/static/js/ .....
   ```
   
   and
   
   ```
   DEBUG        rank/rank_service.go:255        user XXX want to do action ....
   ```
   
   I see you released a v2, which also solves two other issues that I reported. I will try upgrade to that version and continue my testing.
   
   From the logs, I see there is a kind of cron scheduler that schedules periodic tasks. I have not looked at the implementation, but could it be that one of these tasks gets stuck, keeps retrying, then the scheduler schedules a new duplicate cron task meaning that there are now two tasks retrying, shortly after three and so on...?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "brocaar (via GitHub)" <gi...@apache.org>.
brocaar commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3847944701

   @LinkinStars what would be the steps to re-compile answer with code modifications (e.g. adding pprof)? I can make Go code changes, but since I'm using the `answer build` command, it seems there is some magic being done automatically (fetching the source, compiling the frontend, and including the plugins in the answer binary).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "brocaar (via GitHub)" <gi...@apache.org>.
brocaar commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3846384655

   @LinkinStars just to let you know, with v2, I still this behavior once leaving it running overnight... What else can I do to help you debugging this? It seems it takes ~ 24 hours before I see this, e.g. I notice in the morning, I restart it and during the day all is fine. It does not seem to slowly rise. Then the next morning when I check again it is at ~99%.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3948703104

   > [@LinkinStars](https://github.com/LinkinStars) looks like the issue has been solved with the latest changes.
   
   OK, the next update will include this fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "maishivamhoo123 (via GitHub)" <gi...@apache.org>.
maishivamhoo123 commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3858644796

   @LinkinStars  can you please assign this issue to me? I love to contribute to this isssue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "brocaar (via GitHub)" <gi...@apache.org>.
brocaar commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3870362838

   @LinkinStars I have just built the `dev` branch. Fingers crossed 🤞 
   
   ```
   ./answer --version
   answer version 2.0.0
   revision: 638fb082
   build time: 1770627386
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "brocaar (via GitHub)" <gi...@apache.org>.
brocaar commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3852898085

   @LinkinStars I will try the above next week, but I found this error this morning in the logs, around the same time there was a CPU spike:
   
   ```
   Feb 05 09:44:56 chirpstack-support answer[2147189]: 2026-02-05 09:44:56.921        DEBUG        controller/connector_controller.go:134        connector received: {ExternalID:XXXXXX DisplayName:XXXX XXXXXX Username:XXXXX XXXXX Email:XXXXXXX Avatar:https://lh3.googleusercontent.com/[1000+ chars string] MetaInfo:{
   Feb 05 09:44:56 chirpstack-support answer[2147189]:   "sub": "XXXX",
   Feb 05 09:44:56 chirpstack-support answer[2147189]:   "name": "XXXXXX",
   Feb 05 09:44:56 chirpstack-support answer[2147189]:   "given_name": "XXXXXX ",
   Feb 05 09:44:56 chirpstack-support answer[2147189]:   "family_name": "XXXX",
   Feb 05 09:44:56 chirpstack-support answer[2147189]:   "picture": "https://lh3.googleusercontent.com/a-/[1000+ chars string]",
   Feb 05 09:44:56 chirpstack-support answer[2147189]:   "email": "XXXXX",
   Feb 05 09:44:56 chirpstack-support answer[2147189]:   "email_verified": true,
   Feb 05 09:44:56 chirpstack-support answer[2147189]:   "hd": "XXXXXXX"
   Feb 05 09:44:56 chirpstack-support answer[2147189]: }}
   Feb 05 09:44:57 chirpstack-support answer[2147189]: 2026-02-05 09:44:57.646        ERROR        controller/connector_controller.go:146        external login failed: code: 500, reason: base.database_error, message: , error: pq: value too long for type character varying(1024)
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/apache/answer/internal/repo/user/user_repo.go:66 github.com/apache/answer/internal/repo/user.(*userRepo).AddUser.func1
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/xorm.io/xorm/engine.go:1423 xorm.io/xorm.(*Engine).Transaction
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/apache/answer/internal/repo/user/user_repo.go:54 github.com/apache/answer/internal/repo/user.(*userRepo).AddUser
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/apache/answer/internal/service/user_external_login/user_external_login_service.go:209 github.com/apache/answer/internal/service/user_external_login.(*UserExternalLoginService).registerNewUser
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/apache/answer/internal/service/user_external_login/user_external_login_service.go:156 github.com/apache/answer/internal/service/user_external_login.(*UserExternalLoginService).ExternalLogin
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/apache/answer/internal/controller/connector_controller.go:144 github.com/apache/answer/internal/controller.(*ConnectorController).ConnectorRedirectDispatcher.(*ConnectorController).ConnectorRedirect.func2
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/apache/answer/internal/controller/connector_controller.go:97 github.com/apache/answer/internal/controller.(*ConnectorController).ConnectorRedirectDispatcher
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/anargu/gin-brotli/gin_brotli.go:71 github.com/apache/answer/internal/base/server.NewHTTPServer.Brotli.func3
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/gin-gonic/gin/gin.go:633 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /apache-answer-2.0.0-bin-linux-amd64/answer_build3005906725/vendor/github.com/gin-gonic/gin/gin.go:589 github.com/gin-gonic/gin.(*Engine).ServeHTTP
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /nix/store/4wc5q32wgrhac7vb4da1zclhvw7r01wx-go-1.25.5/share/go/src/net/http/server.go:3340 net/http.serverHandler.ServeHTTP
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /nix/store/4wc5q32wgrhac7vb4da1zclhvw7r01wx-go-1.25.5/share/go/src/net/http/server.go:2109 net/http.(*conn).serve
   Feb 05 09:44:57 chirpstack-support answer[2147189]: /nix/store/4wc5q32wgrhac7vb4da1zclhvw7r01wx-go-1.25.5/share/go/src/runtime/asm_amd64.s:1693 runtime.goexit
   ```
   
   Even if it turns out it is not related, then I think it still should be fixed....


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars closed issue #1493: Answer process jumps after few days to ~ 99% CPU usage
URL: https://github.com/apache/answer/issues/1493


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3852362109

   > Should I follow these steps first: https://github.com/apache/answer?tab=readme-ov-file#build
   > 
   > And then using that binary execute `./answer build ....` to build the binary with plugins
   
   @brocaar Yes. Your steps are correct. The ANSWER_MODULE environment variable must be set.
   
   ```bash
   make ui
   make build
   
   export ANSWER_MODULE="$PWD"
   ./answer build \
     --output ./new_answer \
     --with github.com/apache/answer-plugins/cache-redis@latest \
     --with github.com/apache/answer-plugins/connector-github@latest \
     --with github.com/apache/answer-plugins/connector-google@latest \
     --with github.com/apache/answer-plugins/quick-links@latest \
     --with github.com/apache/answer-plugins/render-markdown-codehighlight@latest \
     --with github.com/apache/answer-plugins/reviewer-basic@latest \
     --with github.com/apache/answer-plugins/storage-s3@latest
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3845170946

   > From the logs, I see there is a kind of cron scheduler that schedules periodic tasks. I have not looked at the implementation, but could it be that one of these tasks gets stuck, keeps retrying, then the scheduler schedules a new duplicate cron task meaning that there are now two tasks retrying, shortly after three and so on...?
   
   It's unlikely caused by scheduled tasks. If it were, our tests should have detected it. We suspect it's triggered under specific conditions. We've deployed `pprof` and `prometheus` to monitor CPU and memory usage. Should any issues arise, we'll fix them ASAP.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "brocaar (via GitHub)" <gi...@apache.org>.
brocaar commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3834437670

   @LinkinStars, will do. I just restarted the process with DEBUG logging. It is now running at ~ 1% CPU as it should. Once it starts spiking again, I'll let you know. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "brocaar (via GitHub)" <gi...@apache.org>.
brocaar commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3889757130

   @LinkinStars thanks, I have created a new build based on the latest change. Hopefully this will fix the high CPU usage issue. I'll keep you posted.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3851804702

   @brocaar If possible, you can build a binary or Docker image using the `dev` branch and package the plugins that you need for testing. If the issue persists, please continue to provide feedback to me. Thank you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "brocaar (via GitHub)" <gi...@apache.org>.
brocaar commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3870412138

   I'm rolling back, because this version breaks every page.....
   
   <img width="2553" height="1704" alt="Image" src="https://github.com/user-attachments/assets/1122cf8d-69f9-4a32-8430-8f939d121444" />
   
   ```
   Feb 09 09:19:05 chirpstack-support answer[2218476]: 2026-02-09 09:19:05.213        ERROR        handler/handler.go:53        code: 500, reason: base.database_error, message: , error: pq: invalid input syntax for type bigint: "null"
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/apache/answer/internal/repo/comment/comment_repo.go:112 github.com/apache/answer/internal/repo/comment.(*commentRepo).GetComment
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/apache/answer/internal/service/comment/comment_service.go:399 github.com/apache/answer/internal/service/comment.(*CommentService).GetCommentWithPage
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/apache/answer/internal/controller/comment_controller.go:261 github.com/apache/answer/internal/controller.(*CommentController).GetCommentWithPage
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/apache/answer/internal/base/middleware/auth.go:88 github.com/apache/answer/internal/base/server.NewHTTPServer.(*AuthUserMiddleware).EjectUserBySiteInfo.func9
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/apache/answer/internal/base/middleware/auth.go:75 github.com/apache/answer/internal/base/server.NewHTTPServer.(*AuthUserMiddleware).Auth.func8
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/anargu/gin-brotli/gin_brotli.go:71 github.com/apache/answer/internal/base/server.NewHTTPServer.Brotli.func3
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/context.go:185 github.com/gin-gonic/gin.(*Context).Next
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/gin.go:633 github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /home/brocaar/Work/Projects/ChirpStack/Answer/Test-build/answer/answer_build1596584388/vendor/github.com/gin-gonic/gin/gin.go:589 github.com/gin-gonic/gin.(*Engine).ServeHTTP
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /nix/store/4wc5q32wgrhac7vb4da1zclhvw7r01wx-go-1.25.5/share/go/src/net/http/server.go:3340 net/http.serverHandler.ServeHTTP
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /nix/store/4wc5q32wgrhac7vb4da1zclhvw7r01wx-go-1.25.5/share/go/src/net/http/server.go:2109 net/http.(*conn).serve
   Feb 09 09:19:05 chirpstack-support answer[2218476]: /nix/store/4wc5q32wgrhac7vb4da1zclhvw7r01wx-go-1.25.5/share/go/src/runtime/asm_amd64.s:1693 runtime.goexit
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3859316817

   > [@LinkinStars](https://github.com/LinkinStars) and @team can you please assign this issue to me? I love to contribute to this isssue.
   
   @maishivamhoo123 If you're referring to the CPU issue, we're already working on a fix and currently validating it. If you're referring to the field length issue, you can comment under another issue. https://github.com/apache/answer/issues/1498


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3834409560

   @brocaar Alright, if any additional error logs appear, please provide them to us. Then, please share the list of plugins you're currently using, and we'll continue to follow up on this issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "brocaar (via GitHub)" <gi...@apache.org>.
brocaar commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-3919592653

   @LinkinStars looks like the issue has been solved with the latest changes. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [I] Answer process jumps after few days to ~ 99% CPU usage [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars commented on issue #1493:
URL: https://github.com/apache/answer/issues/1493#issuecomment-4581937977

   Fix in v2.0.1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org