Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent 500 ERROR on endpoint /rest/category/entries (public instance) #1125

Closed
Crul opened this issue Jul 26, 2023 · 7 comments
Closed

Comments

@Crul
Copy link

Crul commented Jul 26, 2023

Describe the bug
Intermittent 500 ERROR on endpoint https://www.commafeed.com/rest/category/entries (of the public instance).
Full JSON response on bottom

The only pattern I've found is that the requests that fail are all very close to 1 min while the requests that succeed are all under 1 minute. So I would bet on a timeout.

To Reproduce
Unfortunately, the error is inconsistent and does not always fail. Requesting categories with a lot of feeds makes it more likely to fail, but not guaranteed. This is one URL that fails a lot for me:

https://www.commafeed.com/rest/category/entries?id=31741044&order=desc&readType=unread&offset=0&limit=50&keywords=

Environment

  • CommaFeed version (or "commafeed.com"): 3.8.1 (04c74b5) - public instance
  • Browser: Firefox 115.0.2 (64-bit)
  • Device: Desktop Win 10

Additional context
Full JSON response:

{
    "status":"500",
    "url":"/rest/category/entries",
    "message":"javax.servlet.ServletException: org.hibernate.TransactionException: Unable to rollback against JDBC Connection",
    "cause0":"javax.servlet.ServletException: org.hibernate.TransactionException: Unable to rollback against JDBC Connection",
    "cause1":"org.hibernate.TransactionException: Unable to rollback against JDBC Connection",
    "cause2":"java.sql.SQLException: Connection has already been closed.",
    "servlet":"jersey"
}

Thanks!

@Athou
Copy link
Owner

Athou commented Jul 28, 2023

You're right, there is a 1 minute timeout on queries. The server is getting old and the disks are slow :( As to what can be done about it, please see this comment I made earlier this week.

@Crul
Copy link
Author

Crul commented Jul 28, 2023

I fully agree with CPUGPU's words, only difference being that I have only donated once.

Again, thanks for all the work.

@Athou
Copy link
Owner

Athou commented Aug 1, 2023

I managed to find a server with SSD drives at the same cost as the current server.
I migrated users and feeds but I could not migrate entries because the old drives were so slow that it would have taken weeks.

Can you give it a try https://new.commafeed.com/ ? It should be way faster than the current server :)

I'll monitor things for a while, if everything is smooth I'll consider switching commafeed.com to this instance.

@Crul
Copy link
Author

Crul commented Aug 1, 2023

It should be way faster than the current server :)

It is, I get consistent <8 segs on the request that time outs half the time in the other server.

I could not migrate entries because the old drives were so slow that it would have taken weeks.

No complains at all from my side.

Thank you very much!

@CPUGPU
Copy link
Sponsor

CPUGPU commented Aug 1, 2023

WOW! More than 800 unread entries and the All category showed all in just 2-3 seconds after clicking "log in". Night and day difference. Thank you!

Unfortunate we lose old entries, but that would happen if I switch to self-hosting anyway, so not a big problem. I converted all my starred entries to a folder of bookmarks so no loss there either.

Should we just start using the new server as production? Or do you want to do a formal announcement and transition to get it onto https://commafeed.com?

@Athou
Copy link
Owner

Athou commented Aug 1, 2023

I'll monitor the new server for a few days to make sure everything is ok, then I'll make an announcement of some sort before redirecting commafeed.com to the new server and removing new.commafeed.com
I'll probably also reset the database of the new server to the state of the old server to make sure the new server is up to date with the changes made by users between today and then.

@Athou
Copy link
Owner

Athou commented Aug 3, 2023

Server migration is done, so I'm going to close this. If it happens again please open a new issue! :)

@Athou Athou closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants