This question already has an answer here:
For how long should alerts be displayed? By alert I mean messages such as "You are now logged out." in this page:
Normally, they disappear when the user clicks on some link and the page reloads, but this is a single-page-application, the page never reloads (unless the user decides to do so manually).
So, for how long should it be displayed? Any amount of time feels both very short and very long. Leaving it forever (until the user closes it) might not be a good idea either.