Im trying to run a $wpdb->insert ONCE on every page load (for testing purposes). The insert will insert a meta field for a post type. I have tried hooking the insert function into "init", add it to the theme function, hook it to "wp_loaded" and other hooks too. It seems that no matter what I do, the insert runs once before and 1-2 times after the page loads. resulting in 2-3 inserts per page load. I'm going a little crazy here. I have switched to twenty fifteen, and disabled all plugins.
Any ideas whats going on, or how to test it further?