Free Support Forum - groupdocs.com

Performance concern


#1

Hi


We are launching a learning management application
next week and we have used groupdocs viewer for displaying uploaded
courses for learner [end user] . This will be launched to 1000+ users
and at least 100 users will be simultaneously using this at any point of
time. With couple of users the system displays documents quite fast
with no issues, today we just tested with 10 simultaneous users we
observed that it took close to 2 minutes open document [which other wise
opened with in 20 secs when tested with single user . file size is
between 3 to 4 MB] and for couple of users it even showed error “could
not open document” when refreshed it displayed for them too after 1 and
half minute. This has become huge concern for us as we plan to launch to
so many users next week. Please let us know if there is any solution
for this . Please also let us know if this groupdocs library has been
used in systems with 100+ simultaneous users and how is it performing
there? Looking forward for quick response.

Please find code below.
Controller logic :
[AllowAnonymous]
public ActionResult DocumentViewer(string fileName)
{
AddFiletoStream(fileName);
return View("~/Views/Create/DocumentViewer.cshtml");
}

private void AddFiletoStream(string fileName)
{
string language = SessionBag.Current.PreferredLanguage;
var folderPath = Server.MapPath(contentPath);
var file = folderPath + “” + fileName;
if (language != “English”)// get preferred language document
{
if (System.IO.File.Exists(folderPath + “” + language + “\” + fileName.Split(’
’)[1]))
{
file = folderPath + language + “\” + fileName.Split(’
’)[1];
}
}

_byteStream = new FileStream((file),
FileMode.Open, FileAccess.Read, FileShare.Read);
ViewBag.stream = _byteStream;
ViewBag.filename = fileName;
ViewBag.extension = fileName.Split((’.’))[1];
ViewBag.fileDisplayName = fileName;

}

View logic:

@{
ViewBag.Title = “_DocumentViewer”;
Layout = null;
}

@using Groupdocs.Web.UI
@model dynamic


@Html.CreateViewerScriptLoadBlock().LoadJquery().LoadJqueryUi()




@(Html.ViewerClientCode()
.TargetElementSelector("#test")
.Stream((Stream)ViewBag.stream,
(String)ViewBag.filename,
(String)ViewBag.extension,
(String)ViewBag.fileDisplayName)
.ZoomToFitWidth())






Please find attached ppt file, which multiple users are trying to access and the error screenshot as well.

server configuration details are as mentioned below.

Windows server 2012 R 2 edition
Processor: Intel® Xeon® CPU E5-2670v2@2.50 GHZ 2.49 GHZ
RAM 7.5 GB
IIS 8.5
application is developed in MVC 4(Razor View)



#2

Hi There,


Thank you for your inquiry,

Please note that the new GroupDocs.Viewer is a UI-less API exposing only UI-less+back end document rendering APIs. Hence it has no concern that how much users are accessing the app which is using GroupDocs.Viewer API . It is more likely an issue of bandwidth or server’s memory.

Please consult with your hosting/domain providers. You can also check the event log of your server when user’s claim that there apps are going to be crashed.

Have a nice day!