PlanSo Forms sessions lead to database bloating and network errors
-
I’ve recently discovered that PlanSo Forms appears to be creating two large problems when installed to a site. Both problems are related to the custom implementation of session management.
The first is that of database bloating. Sessions are created automatically, but it appears the cleanup routine is not being successfully run. The result is tens of thousands of rows of session data filling the wp_options table.
Example: https://i.imgur.com/WSsLPEE.png
I was able to verify this occuring on multiple sites which use PlanSo.
The second problem caused by sessions is less obvious, and may in fact be related to a quirk in WordPress itself.
PlanSo creates a _wp_session cookie for each client, which appears to contain the session ID and start/end times. However WordPress will throw 403 and 404 errors in many situations where the _wp_session cookie has been set, for reasons unknown. As a result sometimes cookies generated by PlanSo can lead to serious site errors, until the session has been cleared.
This can even be replicated on an otherwise clean WordPress install. To reproduce this, try setting a cookie _wp_session to this value:
5105b155559160b171062ca96d3de536%7C%7C1506023860%7C%7C1506023500
This is a “good value”, and everything will work just fine. Now change the value to this:
abd6b0cc5f37a7b131b8a0c3dc061ea4%7C%7C1506023882%7C%7C1506023522
Suddenly, the page and all assets will start throwing errors. (Chrome allows you to edit cookies in the Dev Tools > Application > Cookies panel)
This is a problem because PlanSo creates this cookie, and under certain conditions the value generated will be a “bad value” that leads to these network errors. I don’t understand why only some values produce this behavior.
This is still an incomplete picture of the issue, but I’ve learned as much as I can. If you could weigh in on this issue, or suggest a fix it would be greatly appreciated.
From the little research I’ve done on WordPress sessions, it seems migration to the Transients API may resolve both of these issues. https://codex.www.ads-software.com/Transients_API
Thank you.
- The topic ‘PlanSo Forms sessions lead to database bloating and network errors’ is closed to new replies.