I
Immich•3y ago
DemonWarrior

Weird TCP when trying to load Shared Album

im jusing windows docker-compose using docker desktop any ideas. I get this when loading my reverse proxy and only upon loading shared albums.
connect ECONNREFUSED 172.30.0.7:3001 - ECONNREFUSED
Stacktrace

Error: connect ECONNREFUSED 172.30.0.7:3001
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
connect ECONNREFUSED 172.30.0.7:3001 - ECONNREFUSED
Stacktrace

Error: connect ECONNREFUSED 172.30.0.7:3001
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
No description
60 Replies
DemonWarrior
DemonWarriorOP•3y ago
i get it on local pc connection as well
DemonWarrior
DemonWarriorOP•3y ago
No description
Alex Tran
Alex Tran•3y ago
Can you help check the server log? and can you help posting your setup?
DemonWarrior
DemonWarriorOP•3y ago
tyes sorry. do you want my docker-compose for the setup. it just says 400 error in the docker container. can you specify where i can find the logs?
DemonWarrior
DemonWarriorOP•3y ago
im using version 1.49.0 on Windows 11 Docker-Desktop
Alex Tran
Alex Tran•3y ago
from the command line you can do docker logs immich_server
Alex Tran
Alex Tran•3y ago
hmm everything looks fine perform docker-compose down then docker-compose up from the directory where you store docker-compose.yml file
DemonWarrior
DemonWarriorOP•3y ago
same error but a new error
Alex Tran
Alex Tran•3y ago
<--- Last few GCs --->

[1:0x7f713d927330] 147687 ms: Scavenge (reduce) 2045.6 (2082.6) -> 2045.2 (2082.8) MB, 10.9 / 0.0 ms (average mu = 0.154, current mu = 0.004) allocation failure
[1:0x7f713d927330] 147741 ms: Scavenge (reduce) 2045.8 (2082.8) -> 2045.4 (2083.1) MB, 11.7 / 0.0 ms (average mu = 0.154, current mu = 0.004) allocation failure
[1:0x7f713d927330] 147798 ms: Scavenge (reduce) 2046.1 (2083.1) -> 2045.7 (2083.3) MB, 10.8 / 0.0 ms (average mu = 0.154, current mu = 0.004) allocation failure


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
<--- Last few GCs --->

[1:0x7f713d927330] 147687 ms: Scavenge (reduce) 2045.6 (2082.6) -> 2045.2 (2082.8) MB, 10.9 / 0.0 ms (average mu = 0.154, current mu = 0.004) allocation failure
[1:0x7f713d927330] 147741 ms: Scavenge (reduce) 2045.8 (2082.8) -> 2045.4 (2083.1) MB, 11.7 / 0.0 ms (average mu = 0.154, current mu = 0.004) allocation failure
[1:0x7f713d927330] 147798 ms: Scavenge (reduce) 2046.1 (2083.1) -> 2045.7 (2083.3) MB, 10.8 / 0.0 ms (average mu = 0.154, current mu = 0.004) allocation failure


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
How much RAM do you have on this Immich instance?
Alex Tran
Alex Tran•3y ago
GitHub
[BUG] Album Page takes way to long to load · Issue #1868 · immich-a...
The bug If I open the Albumlist with currently about 7 Albums it takes about 6 seconds to load each time I open the Album overview or return from an Album. It looks like it takes so long to generat...
Zack
Zack•3y ago
Yea, likely. I think that's due to our recent changes in the typeorm entities to return everything all the time. We should now go back and amend the DTOs and the queries so they specifically don't request all relations in certain requests
DemonWarrior
DemonWarriorOP•3y ago
i have set aside 8gb dedicated to ram
DemonWarrior
DemonWarriorOP•3y ago
No description
Zack
Zack•3y ago
Looks to me that whichever container that is gets to 2GB of ram then falls over
Alex Tran
Alex Tran•3y ago
Is the 8GB shared between all containers? regardless, I will push out a fix next release
DemonWarrior
DemonWarriorOP•3y ago
kitchenowl barely uses 512 mbs its just a grocery list app. and nextcloud is basically never used but never goes above 2gb do you know how i can fix it in the meantime
Zack
Zack•3y ago
How many assets do you have on the instance?
DemonWarrior
DemonWarriorOP•3y ago
how can i figure that out?
Alex Tran
Alex Tran•3y ago
Go to administration server stats
DemonWarrior
DemonWarriorOP•3y ago
in docker or immich?
Zack
Zack•3y ago
In the web UI for immich
DemonWarrior
DemonWarriorOP•3y ago
No description
Alex Tran
Alex Tran•3y ago
Hmm not that many, probably lots of album causes the issue
DemonWarrior
DemonWarriorOP•3y ago
i only have 1
Zack
Zack•3y ago
I would say for now that there's not really a huge amount you can do, there's just an issue with the queries we make being not very optimised. For a bit of context, we're going through a huge amount of refactoring in the server to prepare for some big changes, so some of these have introduced some degradation in performance How many assets in it?
DemonWarrior
DemonWarriorOP•3y ago
like 1000-2000 images and videos?
Zack
Zack•3y ago
That'd do it
DemonWarrior
DemonWarriorOP•3y ago
i cant see right now because it wont load
Alex Tran
Alex Tran•3y ago
You can check from the mobile app I believe
DemonWarrior
DemonWarriorOP•3y ago
so how can i fix it in the meantime it was working on 1.48.1 with no issues
Alex Tran
Alex Tran•3y ago
from the Library tab
DemonWarrior
DemonWarriorOP•3y ago
no none of the albums load on any apps or web
Alex Tran
Alex Tran•3y ago
it will list how many assets are there
Zack
Zack•3y ago
I would imagine the mobile app will also crash the server
Alex Tran
Alex Tran•3y ago
ah okay OK I will aim for a release soon to address this issue
Zack
Zack•3y ago
For now, not fixable, and you won't be able to downgrade to 1.48.1 really due to database migrations Will have to wait for a bugfix to be released
Alex Tran
Alex Tran•3y ago
in the mean time, I am not sure why your container would crash as 2GB of ram usage though
DemonWarrior
DemonWarriorOP•3y ago
no worries. Do you know how many days or weeks. I'll look into it i set a dokcer limit to 8gb for docker because it was eating ram for no reason i may have limited the docker to 2gb per docker container ill look into it
Alex Tran
Alex Tran•3y ago
you have dedicated 8GB, in theory it should be able to push beyond the 2GB unless there is hard setting in the Node process itself
Zack
Zack•3y ago
Pretty sure node by default has limits 2GB sounds about right Days for sure I might take a look now to be honest 😛
DemonWarrior
DemonWarriorOP•3y ago
if i fix that limit will it fix most of my error temporarily?
Alex Tran
Alex Tran•3y ago
yeah if Zack can push out a fix I can push out a release sometimes tomorrow
Zack
Zack•3y ago
If you increase the RAM limit, it's possible it'll manage to survive on the extra RAM 😛
DemonWarrior
DemonWarriorOP•3y ago
cool thank you for the great work. I love the app and appreciate all your teams hard work its set at 8GB right now how much should i allocate
Zack
Zack•3y ago
For the server specifically it's set to 8GB? If so, I imagine Node.JS itself is limiting to 2GB You can fix that by setting and environment variable NODE_OPTIONS=--max-old-space-size=4096 That should raise the limit to 4GB
DemonWarrior
DemonWarriorOP•3y ago
it looks like my swap is only set to 2gb but the mem in my ubuntu wsl2 which is how docker is running is set 2g
DemonWarrior
DemonWarriorOP•3y ago
No description
DemonWarrior
DemonWarriorOP•3y ago
this says it only takes 50-80% of your max vmem
DemonWarrior
DemonWarriorOP•3y ago
Limiting Memory Usage in WSL2 | Aleksandr Hovhannisyan
By default, WSL 2 may reserve a significant chunk of your host RAM. Thankfully, we can limit its memory usage with a .wslconfig file.
DemonWarrior
DemonWarriorOP•3y ago
should i do this in the .env files or the compose?
Zack
Zack•3y ago
I would do it on the server container specifically
DemonWarrior
DemonWarriorOP•3y ago
so how would i go about doing that also if i update the image it will lose that setting correct if its not in the compose?
DemonWarrior
DemonWarriorOP•3y ago
like so
No description
bo0tzz
bo0tzz•3y ago
That should do it
DemonWarrior
DemonWarriorOP•3y ago
okay one moment let me try
DemonWarrior
DemonWarriorOP•3y ago
i got in that time thank you!!!!!
No description
DemonWarrior
DemonWarriorOP•3y ago
any idea on the update status?
Alex Tran
Alex Tran•3y ago
yeah it is in, I am planning to push out an update either tonight or tomorrow

Did you find this page helpful?