hay-kot / homebox

Homebox is the inventory and organization system built for the Home User
https://hay-kot.github.io/homebox/
GNU Affero General Public License v3.0
2.6k stars 180 forks source link

Homebox is slow and keeps logging out in few minutes #525

Open Flashky opened 1 year ago

Flashky commented 1 year ago

First Check

Homebox Version

v0.9.2

What is the issue you are experiencing?

I try to add a few items, and it is very slow adding and updating. Sometimes it just logs out and I need to reenter my credentials.

How can the maintainer reproduce the issue?

Just deploy, register with a new user, login and try to add a few items.

Deployment

Docker (Synology)

Deployment Details

I deployed with docker-compose on Synology:

version: '3.8'
services:
  homebox:
    image: ghcr.io/hay-kot/homebox:latest
    container_name: homebox
    restart: unless-stopped
    environment:
    - HBOX_LOG_LEVEL=info
    - HBOX_LOG_FORMAT=text
    - HBOX_WEB_MAX_UPLOAD_SIZE=10
    - TZ=Europe/Madrid
    volumes:
      - /volume1/docker/homebox:/data/
    ports:
      - 3100:7745
hay-kot commented 1 year ago

I try to add a few items, and it is very slow adding and updating

Can you give me some more details on what this means?

Sometimes it just logs out and I need to reenter my credentials.

Flashky commented 1 year ago

How long does it take to update an item?

About 7-8 seconds, it feels a lot. Sometimes it logs out after waiting that time. I have even counted to up to 15-20 seconds and then press F5 and then it logs out. Changes are saved, but it interrupts my flow of adding things to the inventory.

How long does it take to load the page?

Logging in takes at least 7-8 seconds. Updating, when it does not logout, too.

Do your logs indicate any errors?

I don't know if logs are supposed to look like these (kinda hard to find anything): image

I managed to find several authorization errors:

image

What is the Ram/CPU usage on your container?

Pretty low, 66MB of RAM, and less than 0.05% CPU usage. Peaks up to 1.5% CPU usage when updating. image

Do you see the same issue on the Demo site?

Nope, Demo site seems to run pretty fast.

Sometimes it just logs out and I need to reenter my credentials.

What client device are you using, hardware, browser etc... Chrome browser on a Lenovo Legion gaming laptop, shouldn't have issues.

Does the same issue occur on the Demo site?

Nope.

Is your browser configured to auto-delete cookies?

I don't think so, how can I check?

timdonovanuk commented 10 months ago

The homebox demo site practically brings down my Chrome tab. It's incredibly laggy when scrolling or navigating, and I don't mean slow like HTTP calls are slow to load. Actual site interactions are slow, like there is a memory leak in Chrome or something.

icsy7867 commented 10 months ago

The homebox demo site practically brings down my Chrome tab. It's incredibly laggy when scrolling or navigating, and I don't mean slow like HTTP calls are slow to load. Actual site interactions are slow, like there is a memory leak in Chrome or something.

I just tested the demo site on my cell phone using 5g and it seems very snappy and quick to load. I would recommend trying a different browser. If it's specific to chrome, perhaps you have a plugin or something negatively interacting with the site?

I'm running 0.9.2 in my kubernetes server and also no seeing anything like you described.

timdonovanuk commented 10 months ago

Yeah, like I say, it's not a connection issue, so 5G or not is unrelated. Aso it's fine in Firefox.

In Chrome, when I hover over the left hand menu, I can see Chromes CPU usage suddenly spiking to 10% of system usage. My PC fans even kick in! Something ain't right with the animations.

It does the same thing in a Chrome guest instance (i.e. nothing cached, no plugins or extensions).

I don't know much about web performance debugging but this doesn't look healthy:

image

I've just discovered, it's only an issue at ultra wide widths (on a 34" monitor). If I reduce the size of Chrome window to half, no issue.

hay-kot commented 10 months ago

I've just discovered, it's only an issue at ultra wide widths (on a 34" monitor). If I reduce the size of Chrome window to half, no issue.

???

thanks for the details! I'll look into that and see what I can figure out