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

Error: timeout of 4000 ms exceed #141

Open
victor10292 opened this issue Dec 24, 2024 · 3 comments
Open

Error: timeout of 4000 ms exceed #141

victor10292 opened this issue Dec 24, 2024 · 3 comments

Comments

@victor10292
Copy link

I do love the application. It's handy and beautiful. But I want to report a potential enhancement or bug.

This error message shows in the following two scenarios:

  • Visiting the application for the first time. Every time I open the web browser and enter the URL in the address bar, it will show up. But if I change to other page and come back again, it works fine.
  • Visiting the Transaction tab without any filter applied. When I change to Transaction page from Dashboard page, this error will occur. I guess it is because the system is trying to retrieve all the entries in the database, and I have more than 6,000 transaction journal records. It takes too much time to load. In the filter setting page, there is no any filters. Then I tried to add some filters, e.g. the transaction date range. It is okay if the search results is less than 350 records, or the error will occur.

Could you please take a look at the performance issue? Maybe it is caused by Firefly III API. If it is, you can talk with the owner of Firefly III to see how to improve it. Last time, I found it is extremely slow to import records into Firefly III via API, roughly 40 seconds for an entry. I raised a ticket to the owner to get it fixed in a few days. The performance is significantly improved. 2 entries can be inserted in one second.

@cioraneanu
Copy link
Owner

cioraneanu commented Dec 24, 2024

Hello and thank you 😁

You can increase your timeout by setting the docker env variable NUXT_PUBLIC_QUERY_TIMEOUT=8000.
The "transactions list" page always brings data paginated (50 per request) so even if you don't have any filters it should perform decently.

Can you share what DB are you using for Firefly and how long one request for /api/transactions take? (In Chrome -> Inspect -> Network, the request you see after performing a pull to refresh in the transactions list)

@victor10292
Copy link
Author

I am not using Docker. The APP is deployed in my server. So I can't set the environment parameter as you said. I found a similar variable in front/nuxt.config.tx: queryTimeout. I changed it from 4000 to 8000, and restart PM2. But the issue persisted. The alert message is still 4000 ms exceeded. If the change took effect, I would expect the error message is 8000 ms exceeded.

Here is the screenshot from Chrome debug tool. The connection is broken after 4 seconds.

2024-12-25_18-38

I'm using Sqlite in Firefly-iii.

@cioraneanu
Copy link
Owner

You could also try to update the timeout for the backend http client, similar to this one 0638e85, and see if that changes it. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants