hook_menu URL giving 404 error on running site randomly I have a hook_menu URL exposed as a URL and I am also calling the same callback function separately in code 
The URL returns 404 at error at sometimes and starts working fine after a cache clear. 
What could be the possible issue ?
hook_menu Implementation

  $items['test_link/get-response'] = array(
    'title' =&gt; t('Get Response'),
    'page callback' =&gt; 'get_response',
    'page arguments' =&gt; null,
    'access callback'   =&gt; true, // available to all
    'type' =&gt; MENU_CALLBACK,
  ); // end

function get_response($funParams=array(),$res='json'){
  $allParams = drupal_get_query_parameters($_GET);  
  if(isset($funParams['pincode']))
  $allParams=$funParams;    

  $result = array();  
  $result["status"] = TRUE;

  // Processing on allParams and builds the response array
  return displayJSONResponse($result,$res);
}

function displayJSONResponse($response,$res='json'){        
    if($res=='nojson')
        return $response;
    $res = '';
    if(defined('JSON_PRETTY_PRINT'))
    $res = json_encode($response, JSON_PRETTY_PRINT);  
    else
    $res = json_encode($response);
    $json = str_replace('\\/', '/', $res);
    echo $json;    
    exit;
}
Page arguments, if specified, should always be an array. If you do not want to pass any arguments to your callback you should either code an empty array or omit the parameter. From experience I am fairly confident that this is your problem. 

Also, the correct way to return a JSON response is to return NULL from your callback after printing the JSON, rather than exiting. This ensures that cleanup tasks can be run.

Your code does not comply with Drupal standards, and I would strongly advise you to follow them. It's a major part of learning to work with the framework. https://www.drupal.org/docs/develop/standards