Title: _wp_session wp_options
Last modified: December 11, 2016

---

# _wp_session wp_options

 *  Resolved [Cyrille Sanson](https://wordpress.org/support/users/css31/)
 * (@css31)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/_wp_session-wp_options/)
 * Hello,
 * I discovered today that wp_options was full of entries starting with “_wp_session”.
 * There was more than 220k entries. wp_options’ size was around 32Mo.
 * String Locator founds that the only plugin refering to _wp_session was Leaflet
   Maps Marker.
 * Is there a relationship between LMM and these entries in wp_options?
 * Thanks,

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/_wp_session-wp_options/#post-8544179)
 * Hi,
    sorry for the issue – actually a WordPress cron job called lmm_wp_session_garbage_collection
   should be registered, which cleans up those records every hour. Could it be that
   this cron job was removed on your site accidentially? You can check this by installing
   the plugin [https://wordpress.org/plugins/wp-crontrol/](https://wordpress.org/plugins/wp-crontrol/)
   and checking if lmm_wp_session_garbage_collection is shown in the table at the
   site “WP-Cron Events”. If this is not the case, it would be great if you could
   provide a temp admin access for info (a) mapsmarker com (in best case also access
   to phpmyadmin) so that we can analyse why this did not work on your site. best,
   Robert
 *  Thread Starter [Cyrille Sanson](https://wordpress.org/support/users/css31/)
 * (@css31)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/_wp_session-wp_options/#post-8546663)
 * Hi Robert,
 * Yes wp-cron is disabled: `define('DISABLE_WP_CRON', true);`
 * We prefer to use a cron from our server, because there is not enough visitors
   to trigger wp-cron.
 * Maybe it’s not well working if it’s not triggering `lmm_wp_session_garbage_collection`.(
   I checked the LMM’s task is registered.)
 * At the moment there is a new issue. It’s not possible to edit pages or post and
   it seems due to LMM. The editing UI is not displayed.
 * See:
    `"Failed to load: https://ww.example.com/wp-content/plugins/leaflet-maps-
   marker/inc/js/tinymce_button_visual.php?leafletpluginurl=aHR0cHM6Ly9k...v&adminurl
   =aH...textadd=QWp...FydGU=" tinymce.min.js:4:10082`
 * Maybe because of deleting “_wp_session” from wp_otpions?
 * When deactivating LMM editing of page or post is OK.
 * I tried to uninstall/reinstall LMM. No change.
 * What do you think?
 * Thanks,
    -  This reply was modified 9 years, 5 months ago by [Cyrille Sanson](https://wordpress.org/support/users/css31/).
    -  This reply was modified 9 years, 5 months ago by [Cyrille Sanson](https://wordpress.org/support/users/css31/).
    -  This reply was modified 9 years, 5 months ago by [Cyrille Sanson](https://wordpress.org/support/users/css31/).
    -  This reply was modified 9 years, 5 months ago by [Cyrille Sanson](https://wordpress.org/support/users/css31/).
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/_wp_session-wp_options/#post-8569617)
 * Hi,
    sorry for late reply – had some laptop issues recently. Not sure what is
   causing this issue – you could try disabling all other plugins to verify if this
   is caused by a plugin conflict. Another solution would be to disable the TinyMCE
   button integration by going to Settings / Misc / “WordPress integration settings”&
   disabling the related option best, Robert
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/_wp_session-wp_options/#post-8635795)
 * Hi Cyrille,
 * we finally found the issue: the SQL statement for deleting expired sessions was
   broken (by our intention to harden the SQL against SQL injections) – sorry that
   this was missed by our tests. We hotfixed the current v3.11.2 release, the official
   fix will be included in the upcoming v3.12 currently in development.
 * If you want to apply the hotfix already now, please re-download the current package
   from [https://downloads.wordpress.org/plugin/leaflet-maps-marker.3.11.2.zip](https://downloads.wordpress.org/plugin/leaflet-maps-marker.3.11.2.zip)
   and overwrite the following files on your server:
    - `/wp-content/plugins/leaflet-maps-marker/inc/class-mmp-geocoding.php`
    - `/wp-content/plugins/leaflet-maps-marker/inc/Stiphle/Storage/Session/class-
      wp-session-utils.php`
    - `/wp-content/plugins/leaflet-maps-marker/inc/Stiphle/Throttle/LeakyBucket.
      php`
 * After applying this hotfix, 1000 expired entries will be deleted each hour.
 * To delete all wp-session entries at once, please execute the following SQL statement
   via phpmyadmin (making a backup first is recommened as always if direct SQL commands
   are executed):
 * `DELETE FROM wp_options WHERE option_name LIKE '_wp_session_%'`
 * This cleanup (together with other session optimizations currently under development)
   will also be included in the upcoming v3.12 release which we hope to finish by
   the end of January.
 * best regards,
 * Robert
 *  Thread Starter [Cyrille Sanson](https://wordpress.org/support/users/css31/)
 * (@css31)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/_wp_session-wp_options/#post-8648616)
 * Hi Robert,
    Thank you very much.
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/_wp_session-wp_options/#post-9059110)
 * For reference: v3.12 with a fix to this issue has already been released
 *  [bramvandenbulcke](https://wordpress.org/support/users/bramvandenbulcke/)
 * (@bramvandenbulcke)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/_wp_session-wp_options/#post-9298349)
 * Hi Robert,
 * I’m facing this issue on a clients’ website (which I haven’ built btw). The wp_options
   table is full of entries starting with ‘_wp_session_%’ and is around 100MB in
   size.
 * The Leaflet Maps Marker plugin is on version 3.12. PHP version is 5.4.45.
 * Is there a way to force the cleanup? Or is running the SQL-command the only option?
 * Regards,
    Bram
    -  This reply was modified 8 years, 11 months ago by [bramvandenbulcke](https://wordpress.org/support/users/bramvandenbulcke/).
    -  This reply was modified 8 years, 11 months ago by [bramvandenbulcke](https://wordpress.org/support/users/bramvandenbulcke/).
 *  Plugin Author [Robert Seyfriedsberger](https://wordpress.org/support/users/harmr/)
 * (@harmr)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/_wp_session-wp_options/#post-9299560)
 * Hi Bram,
    to force the cleanup at once, the SQL command `DELETE FROM wp_options
   WHERE option_name LIKE '_wp_session_%'` has to be executed once. We did not add
   a cleanup tool, as since v3.12 new entry are only created if geolocation is triggered
   on backend. best, Robert
 *  [Nathan Lake](https://wordpress.org/support/users/nathanlake2/)
 * (@nathanlake2)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/_wp_session-wp_options/#post-9554132)
 * I have been running Leaflet Maps 3.12.1 and it created 410k records in my wp_options
   table. Had to delete it.. No I have 1500 records in wp_options.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘_wp_session wp_options’ is closed to new replies.

 * ![](https://ps.w.org/leaflet-maps-marker/assets/icon.svg?rev=970936)
 * [Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)](https://wordpress.org/plugins/leaflet-maps-marker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-maps-marker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-maps-marker/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-maps-marker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-maps-marker/reviews/)

 * 9 replies
 * 4 participants
 * Last reply from: [Nathan Lake](https://wordpress.org/support/users/nathanlake2/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/_wp_session-wp_options/#post-9554132)
 * Status: resolved