Documentation
-
Home
-
Getting Started
-
Common Tasks
-
The Servd Plugin
-
Project Settings
-
Domains & SSL
-
Importing & Cloning
-
Assets
-
Logs
-
Plans and Billing
-
Addons
-
Team & Project Management
-
Project Security
-
Your Account
-
Troubleshooting
-
Restart Instances
-
Repair Database
-
Craft isn't installed yet
-
Speeding Up Your Project
-
My Uploaded Assets Are Disappearing
-
My Sessions Are Expiring Too Soon
-
Why Are My Environments Behaving Differently?
-
No URL found for submodule path
-
Composer and Private Repositories
-
Composer out of memory errors
-
An SSL certificate for a domain has failed to generate or renew
-
Animated GIFs Displaying Incorrectly
-
Out of memory whilst running CLI tasks
-
CloudFlare: domain already exists
-
Permission Denied Whilst Generating PDFs
-
"server reached max_children setting (5), consider raising it"
-
Missing composer "allow-plugins" config
-
Unexpected robots.txt Content
-
Why is Servd is slower than my old VPS server?
-
Error: headers already sent
-
Where's the node_modules directory?
-
-
Cookbook
-
Now & Next
-
The Small Print
My Sessions Are Expiring Too Soon
If your project is experiencing Craft Commerce carts expiring quickly, or users being logged out too soon, then it may be the case that Servd's default session lengths is too short for your project. PHP's session configuration, specifically the session.cookie_lifetime and session.gc_maxlifetime settings, will need increasing.
Fortunately, PHP's session length is configurable in Servd. To change it, please perform the following steps:
-
Navigate to your project Production or Staging Environment Variables page.
-
Add a new environment variable. Set the key to PHP_SESSION_LENGTH and the value to the number of seconds you would like to set the session length to be.
-
Click the "Save" button at the bottom of the environment variable list.
-
Click the Sync button to deploy the new environment variable.