antonioribeiro / countries

Laravel countries and currencies
BSD 3-Clause "New" or "Revised" License
1.83k stars 281 forks source link

mkdir(): File exists #165

Open ametad opened 3 years ago

ametad commented 3 years ago

https://github.com/antonioribeiro/countries/blob/b20491ee69f0b4f6fa3d633a25264c4ff777083d/src/package/Services/Cache/Managers/Nette.php#L66

In my logs I encounter every day this error "mkdir(): File exists " from the above code fragment. In production it lives in a kubernetes pod, so the instance is new/fresh regularly.

Am I correct to assume that the error could be because of multiple request life cycles try to create the temp cache dir at the same time?

It is not a very big problem, because after this the following life cycles will have the temp cache dir in place and so, no error is thrown. But for me this is on a daily basis and I would love to fix this for my users who occasionally see an error 500 on their screen.

goper-leo commented 3 years ago

@ametad I also encounter this. Did you manage to solve this one?

ametad commented 3 years ago

No... I am sorry. Are you also seeing this regularly?

I found out this is a known problem with implementing mkdir():

doubleprincez commented 1 year ago

Any solution to this yet? I dont seem to know why my debugger gets filled with this same error.