Background callback intermittent issue - No pid found

I am a beginner in Plotly, Dash. I have written a background callback function. On updating it, sometimes it shows error - No process id found.
Code snippet is shown below

cache = diskcache.Cache("./cache")
background_callback_manager = DiskcacheManager(cache)
@app.callback(
    Output('intermediate-value','data'),
    Input(component_id=input_dropdown, component_property='value')
)
def cleanData(input):   # the intermediate cleaned data is used in another function too
     if input is not None:
           df2=df[df['col']==input]
           # cleaning steps
           return cleaneddf2
   else:
         return None



@dash.callback(
    Output(component_id='outputDCC', component_property='figure'),
    Input('intermediate-value','data'),background=True,
    manager=background_callback_manager
)
def createView(data):
     if data is not None:
                 # do some necessary heavy calculations
                  figure=px.imshow(............)
                  return figure
   else:
               return None

The error occurs seldom, not often. Still as users will be using it, is there any way to prevent or safeguard against these errors?