The ultimate answer will be in your server logs, I’m afraid. (You can also turn on debugging in wp-config – sometimes that helps too)
But I did notice a few things that hopefully can help you track the issue:
<?php
// You should not require the $orig_post variable...
global $post;
// Get the tag ids directly:
$tag_ids = wp_get_post_tags( $post->ID, array( 'fields' => 'ids' ) );
if (!empty($tag_ids)) {
$args=array(
'tag__in' => $tag_ids,
'post__not_in' => array($post->ID),
'posts_per_page'=>2, // Number of related posts to display.
'caller_get_posts'=>1
);
$my_query = new WP_Query( $args );
while( $my_query->have_posts() ) {
$my_query->the_post();
// **** What is the "set_featured_image_bg" function? Is it defined?
?>
<li class="full entry animate-box ll-article" style="background-image: url('<?php set_featured_image_bg(); ?>');" data-animate-effect="fadeIn">
<div class="overlay"></div>
<div class="entry-desc">
<div class="border-police">
<a href="https://wordpress.stackexchange.com/questions/259074/<?php the_permalink(); ?>"><h3><?php the_title(); ?></h3></a>
</div>
</div>
</li>
<? }
wp_reset_postdata(); // use this instead of "wp_reset_query", and right after you end your while loop...
}
?>
Good luck!