using wp_insert_post inside of custom meta box

Yep, wp_insert_post will call save_post, hence the closed-loop.

Use

remove_action( 'save_post', 'generate_ceu');
$pid = wp_insert_post($new_post);
add_action( 'save_post', 'generate_ceu');

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)