Shlink database build issue #1171
Replies: 13 comments
-
It's hard to tell why is it failing, as systems like cPanel mess with the system at their will. I would try searching what that MySQL error code means "Exit Code: 10". |
Beta Was this translation helpful? Give feedback.
-
Oh OK. It says 10 is "Error allocating memory". |
Beta Was this translation helpful? Give feedback.
-
I also noticed in the error log file [07:07:26 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 35346191 bytes) in /home//****/vendor/shlinkio/shlink-ip-geolocation/src/GeoLite2/DbUpdater.php on line 68 |
Beta Was this translation helpful? Give feedback.
-
Is there something I need to do for the GeoLite DB other than adding my license key? |
Beta Was this translation helpful? Give feedback.
-
What Shlink version are you using? |
Beta Was this translation helpful? Give feedback.
-
I'm using V.2.8.0 At the moment my mySQL db only has a "migrations" table. |
Beta Was this translation helpful? Give feedback.
-
Try increasing the reserved memory for PHP and MySQL |
Beta Was this translation helpful? Give feedback.
-
I've increased php mem limit to 1024M. |
Beta Was this translation helpful? Give feedback.
-
Retried it and it still throws the errorCustom configuration properly generated! Updating database... [Running "/opt/cpanel/ea-php80/root/usr/bin/php bin/cli db:migrate"] RUN '/opt/cpanel/ea-php80/root/usr/bin/php' 'bin/cli' 'db:migrate' |
Beta Was this translation helpful? Give feedback.
-
Hi,
|
Beta Was this translation helpful? Give feedback.
-
We retried after updating the memory limits and got:[15-Aug-2021 07:36:57 UTC] PHP Fatal error: Uncaught TypeError: Shlinkio\Shlink\Installer\Config\Option\Database\DatabaseUserConfigOption::askRequired(): Return value must be of type string, null returned in /home//****/vendor/shlinkio/shlink-installer/src/Util/AskUtilsTrait.php:20 |
Beta Was this translation helpful? Give feedback.
-
Tried running db:migrate after db:create said the db already exists and to run the migrate command with -vvv on... and got: bin/cli db:migrate -vvv [Symfony\Component\Process\Exception\ProcessFailedException] Exit Code: 10(Unknown error) Working directory: /home// Output:Error Output:In SchemaException.php line 34:
migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration Exception trace: db:migrate |
Beta Was this translation helpful? Give feedback.
-
Do I add the virtual host code to the public or root htaccess file? |
Beta Was this translation helpful? Give feedback.
-
Hi there,
I'm working to get shlink setup on my vps with cpanel. I initially tried just the SQLite option, but after that wouldn't work I tried creating a mySQL db and installing there.. I've unzipped the latest self-hosted folders into the root directory of a domain I added into my VPS server via cpanel (an addon domain method). I have used the CLI commands (sometimes when using -vvv I get php memory exhausted errors which I addressed by boosting the limit to 1024M for now)..
It seems there is some issue with creating the tables in the new database.. I enabled write access to the data directory using File Manager User & Group : Write permissions... Is there another way I need to recursively enable that write access? Is there something else going on that is blocking the bin/install or bin/update (I've attempted both) from properly building the DB? I've also tried the migrate route, nothing seems to resolve this..
Very grateful for your wisdom on this, and thank you for your brilliant work in creating this utility!
Custom configuration properly generated!
Initializing database... [Running "/opt/cpanel/ea-php80/root/usr/bin/php bin/cli db:create"] RUN '/opt/cpanel/ea-php80/root/usr/bin/php' 'bin/cli' 'db:create'
OUT
OUT [OK] Database already exists. Run "db:migrate" command to make sure it is up to
OUT date.
OUT
OUT
RES Command ran successfully
Success!
Updating database... [Running "/opt/cpanel/ea-php80/root/usr/bin/php bin/cli db:migrate"] RUN '/opt/cpanel/ea-php80/root/usr/bin/php' 'bin/cli' 'db:migrate'
OUT Migrating database...
OUT
ERR
ERR In Process.php line 270:
ERR
ERR The command "'/opt/cpanel/ea-php80/root/usr/bin/php' 'vendor/doctrine/migra
ERR tions/bin/doctrine-migrations.php' 'migrations:migrate' '--no-interaction'"
ERR failed.
ERR
ERR Exit Code: 10(Unknown error)
ERR
ERR Working directory: /home//*******
ERR
ERR Output:
ERR ================
ERR
ERR
ERR Error Output:
ERR ================
ERR
ERR In SchemaException.php line 34:
ERR
ERR There is no table with name '*********.short_urls' in the schema.
ERR
ERR
ERR migrations:migrate [--write-sql [WRITE-SQL]] [--dry-run] [--query-time] [--
ERR allow-no-migration] [--all-or-nothing [ALL-OR-NOTHING]] [--configuration CO
ERR NFIGURATION] [--em EM] [--conn CONN] [--] []
ERR
ERR
ERR db:migrate
ERR
ERR
RES 1 Command did not run successfully
Beta Was this translation helpful? Give feedback.
All reactions