I'm on a fresh install of Phabricator. I cannot overcome the problem with:
> Lock wait timeout exceeded; try restarting transaction
This occurs only when I try to create a new Project, or edit a user profile by clicking on "Edit" on the user's avatar.
I've tested Phabricator on both - a local database and RDS - both MariaDB, InnoDB engine - the problem occurs with both.
I'm on the latest "stable" branch of Phabricator. Innodb_lock_wait_timeout is set to 50.
SHOW ENGINE INNODB STATUS reports (only part of the "Transactions" section is shown):
> ---TRANSACTION 0, not started
> MySQL thread id 355, OS thread handle 0x7f7d846db700, query id 2304 localhost root cleaning up
> ---TRANSACTION 0, not started
> MySQL thread id 354, OS thread handle 0x7f7d83732700, query id 2302 localhost root cleaning up
> ---TRANSACTION 0, not started
> MySQL thread id 196, OS thread handle 0x7f7d83657700, query id 2343 localhost root init
> show engine innodb status
> ---TRANSACTION 9093, ACTIVE 13 sec
> 7 lock struct(s), heap size 1184, 2 row lock(s), undo log entries 10
> MySQL thread id 298, OS thread handle 0x7f7d8077b700, query id 2075 localhost root cleaning up
> Trx read view will not see trx with id >= 9098, sees < 9098
SHOW FULL PROCESSLIST:
```
MariaDB [(none)]> show full processlist;
+-----+------+-----------+---------------------+---------+------+-------+-----------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+-----+------+-----------+---------------------+---------+------+-------+-----------------------+----------+
| 196 | root | localhost | NULL | Query | 0 | init | show full processlist | 0.000 |
| 292 | root | localhost | phabricator_config | Sleep | 48 | | NULL | 0.000 |
| 293 | root | localhost | phabricator_cache | Sleep | 48 | | NULL | 0.000 |
| 294 | root | localhost | phabricator_user | Sleep | 48 | | NULL | 0.000 |
| 295 | root | localhost | phabricator_spaces | Sleep | 48 | | NULL | 0.000 |
| 296 | root | localhost | phabricator_search | Sleep | 48 | | NULL | 0.000 |
| 297 | root | localhost | phabricator_project | Sleep | 47 | | NULL | 0.000 |
| 298 | root | localhost | phabricator_project | Sleep | 47 | | NULL | 0.000 |
| 299 | root | localhost | phabricator_file | Sleep | 47 | | NULL | 0.000 |
+-----+------+-----------+---------------------+---------+------+-------+-----------------------+----------+
```
The above would result either in an exception or 504 Gateway Timeout. Other post requests pass without problems - the issue relates only to adding a new project and editing a user profile - at leat I know only of these to places. Please also notice that the actual INSERT query does not seem to be executed at all. The transaction seem to hang on **cleaning up**.