Concurrency not working
I am using SQLite 3 with PHP 7 + NGINX.
It appears the write-ahead log is supposed to write to temporary files when the database is locked, to allow for concurrency.
However, when I try to write to the database simultaneously, I am greeted with the "database is locked" error.
No temporary files are created.
Am I supposed to enable the write-ahead log? Is it disabled by default?
If so, how do I enable it
I recommend study of the main WAL doc.
Your thread title needs an edit. Yes, WAL mode is not the default. It works well when selected. See the doc for ways to do that, including compile-time options.
So I assume I would only have to activate this once?
Are there any other concurrency-related features that I need to activate - that aren't enabled by default?
No need to assume; see section "3.3 Persistence of WAL mode".
I hesitate to answer your 2nd question as both "concurrency-related features" and "default" are somewhat nebulous concepts for the SQLite project. There are whole doc pages on threading provisions and behavior, and what features get into a build with no options specified is a set that changes over time.
"Writers merely append new content to the end of the WAL file. Because writers do nothing that would interfere with the actions of readers, writers and readers can run at the same time. However, since there is only one WAL file, there can only be one writer at a time."
From Section 2.2 of: https://sqlite.org/wal.html#activating_and_configuring_wal_mode