Unable to connect to R

Rstudio takes long to run and also while running the program it displays the message "Unable to connect to R session" What to do?