slawkens / myaac

A free and open-source Automatic Account Creator (AAC) written in PHP
https://my-aac.org
GNU General Public License v3.0
125 stars 99 forks source link

Feature/docker #236

Open slawkens opened 1 year ago

slawkens commented 1 year ago

This setup is extremally slow, takes more than 2 seconds per request, even with status disabled.

The reason for this is currently not known for me.

Edit: I found the reason and fixed it. That was because I was mounting volume directly through WSL 2, which is very slow. Now it loads blazing fast.

How to build: First clone this repo, and change branch to feature/docker (this PR)

git clone https://github.com/slawkens/myaac.git
cd myaac
git checkout feature/docker
docker compose up --build

It may take few minutes to download everything and build.

After this you will have 3 containers:

TFS schema will be automatically imported by docker init script.

in the 4) step - configuration set server path as follows: /home/www-data/forgottenserver

ivenspontes commented 1 year ago

I have issues running on wsl too, to solve this, I clone and up the containers inside wsl. On docker using hyper-v or Linux OS, works very well. Then the problem isnt the compose volume, is the files on Windows and volume on wsl

slawkens commented 1 year ago

I have issues running on wsl too, to solve this, I clone and up the containers inside wsl. On docker using hyper-v or Linux OS, works very well. Then the problem isnt the compose volume, is the files on Windows and volume on wsl

Ok I get. But did you try running my docker files from this branch?

ivenspontes commented 1 year ago

I have issues running on wsl too, to solve this, I clone and up the containers inside wsl. On docker using hyper-v or Linux OS, works very well. Then the problem isnt the compose volume, is the files on Windows and volume on wsl

Ok I get. But did you try running my docker files from this branch?

Yes, running inside WSL, with compose volume, but i remove composer commands from Dockerfile and run inside container. Which requests were slow?

image

slawkens commented 1 year ago

I have issues running on wsl too, to solve this, I clone and up the containers inside wsl. On docker using hyper-v or Linux OS, works very well. Then the problem isnt the compose volume, is the files on Windows and volume on wsl

Ok I get. But did you try running my docker files from this branch?

Yes, running inside WSL, with compose volume, but i remove composer commands from Dockerfile and run inside container. Which requests were slow?

image

Do you mean, you are running with this volumes defined? Which I commented out in latest commits?

https://github.com/slawkens/myaac/pull/236/commits/72d7ee8bf25312d90a8263c60d351caa9ad8abde#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3L16

And it is no slow?

Or you are running just this PR branch with latest changes, and it is no slow?

Because I'm confused now. :P

ivenspontes commented 1 year ago

i revert the comment in volume and commented the COPY,

image

slawkens commented 1 year ago

i revert the comment in volume and commented the COPY,

image

Ah ok. Well, for me all PHP requests are slow, but the rest (assets etc.) loads just fine. image

May be cause I am running in on Windows with WSL 2, and I've heard reading from windows partition is slow.

Do you use WSL 1 or WSL 2?

ivenspontes commented 1 year ago

i revert the comment in volume and commented the COPY,

image

Ah ok. Well, for me all PHP requests are slow, but the rest (assets etc.) loads just fine. image

May be cause I am running in on Windows with WSL 2, and I've heard reading from windows partition is slow.

Do you use WSL 1 or WSL 2?

WSL2, but I put the files inside wsl before up containers, as I commented.

RRadziejewski commented 8 months ago

72.20.0.1 - - [29/Feb/2024:12:09:42 +0000] "POST /install/ HTTP/1.1" 500 321 "http://localhost:8001/install/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0" [Thu Feb 29 12:09:48.506104 2024] [php:error] [pid 18] [client 172.20.0.1:42750] PHP Fatal error: Uncaught RuntimeException: Seems that the table myaac_account_actions of MyAAC doesn't exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting http://localhost:8001/install in /var/www/html/system/init.php:143\nStack trace:\n#0 /var/www/html/index.php(70): require_once()\n#1 {main}\n thrown in /var/www/html/system/init.php on line 143 172.20.0.1 - - [29/Feb/2024:12:09:48 +0000] "GET / HTTP/1.1" 500 321 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0" [Thu Feb 29 12:09:51.482839 2024] [php:error] [pid 22] [client 172.20.0.1:42766] PHP Fatal error: Uncaught RuntimeException: Seems that the table myaac_account_actions of MyAAC doesn't exist in the database. This is a fatal error. You can try to reinstall MyAAC by visiting http://localhost:8001/install in /var/www/html/system/init.php:143\nStack trace:\n#0 /var/www/html/index.php(70): require_once()\n#1 {main}\n thrown in /var/www/html/system/init.php on line 143 172.20.0.1 - - [29/Feb/2024:12:09:51 +0000] "GET / HTTP/1.1" 500 321 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"

Is it even working anymore ? Whenever i try to reach MyAcc it gives me this error.