Showing posts with label Project Server 21013. Show all posts
Showing posts with label Project Server 21013. Show all posts

Monday, April 17, 2017

SQL Deadlocks and the Project Server Queues

SQL Deadlocks and the Project Server Queues


on SQL deadlocks and error messages like the following on a busy server.
System.Data.SqlClient.SqlError: Transaction (Process ID 84) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
You will also see error id 7747 in the application event log.
This can be an issue with systems that are quite stressed and in all cases I have seen relates to the process that selects the queue jobs for processing. It does not break anything as such and no data is lost – but processing of queue jobs is delayed (but as the system is very busy they probably wouldn’t have processed quickly anyway!).
Deadlocks occur when two transactions interact in such a way that one requires a resource that the other has locked, and vice versa. Because neither task can continue until a resource is available and neither resource can be released until a task continues, a deadlock state exists. SQL Server selects one of the transactions as the victim and ends it – and posts the above error.  See the SQL Server Books Online for more details.
In Project Server 2007 you can monitor activity using perfmon, and the counters include SQL retries per minute for both the Project and Timesheet queues. You can also modify the queue settings which can reduce the occurrence or behavior of the deadlocks. We don’t have any prescriptive guidance yet on suggested changes, but certainly reducing the number of threads, increasing the polling interval, or increasing the SQL retry intervals would likely reduce the number of deadlocks you see. However, these changes will also reduce the throughput of your queue – particularly when processing light weight jobs. If you see the deadlock behavior at specific time of day only – and want to change queue settings to suit workload you could even use the QueueSystem web service to change the settings (using the SetQueueConfiguration method).
I’m not sure if anyone will really want to micro-manage their queue in this way – or what the overall throughput benefits would be – but the option is there.

Friday, November 25, 2016

Project server 2013 : cannot create view


Project server 2013 : cannot create view


Hi,

I installed Project server 2013 on a SharePoint 2013 farm , I follow best practice recommendations
, everything goes well until I tried to create a new view from the "Project Web App Settings" page ==> the view doesn't get created and the browser consol displays an internal server error 500!!

After verification on sharepoint logs ==>I did found nothing, oh :o

After many hours of invistigation, i finally did found a warning on the event viewer ==> good news :/



 Event code: 3003 
Event message: A validation error has occurred. 
Event time: 24/11/2016 11:49:00 
Event time (UTC): 24/11/2016 10:49:00 
Event ID: f1579d278df048f480b1deee3faa1c49 
Event sequence: 245 
Event occurrence: 15 
Event detail code: 0 
Application information: 
    Application domain: /LM/W3SVC/1513911398/ROOT-2-131244510754673622 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\inetpub\wwwroot\wss\VirtualDirectories\443\ 
    Machine name: VMXXXXSPO 
Process information: 
    Process ID: 5128 
    Process name: w3wp.exe 
    Account name: Domain\XXXX
Exception information: 
    Exception type: HttpRequestValidationException 
    Exception message: A potentially dangerous Request.Form value was detected from the client (ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$idGroupingSortingParams="<VIEW><GRPBY0>0</GRP...").
   at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.get_Form()
   at Microsoft.SharePoint.SPGlobal.GetParametersFromHttpRequest(SPSite site, Boolean bAuthenticated)
   at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)
   at Microsoft.SharePoint.SPWeb.InitializeSPRequest()
   at Microsoft.SharePoint.SPWeb.EnsureSPRequest()
   at Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web)
   at Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context)
   at Microsoft.SharePoint.SPContext.get_Current()
   at Microsoft.Office.Project.PWA.PJBasePage..ctor(String pwaUrl)
   at Microsoft.Office.Project.PWA.PJWebPage..ctor(String url)
   at __ASP.FastObjectFactory_app_web_viewsaddmod_aspx_ad835a1b_jhjrehvf.Create_ASP__layouts_15_pwa_admin_viewsaddmod_aspx()
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Request information: 
    Request URL: https://XXXX.XXXX.com:443/_layouts/15/pwa/Admin/ViewsAddMod.aspx?idTableUID=&idViewType= 
    Request path: /_layouts/15/pwa/Admin/ViewsAddMod.aspx 
    User host address: 66.160.201.34 
    User: 0#.w|XXX\sp_sql 
    Is authenticated: True 
    Authentication Type: Federation 
    Thread account name: XXXX\sp_sql 
Thread information: 
    Thread ID: 715 
    Thread account name: XXXX\sp_sql 
    Is impersonating: True 
    Stack trace:    at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.get_Form()
   at Microsoft.SharePoint.SPGlobal.GetParametersFromHttpRequest(SPSite site, Boolean bAuthenticated)
   at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)
   at Microsoft.SharePoint.SPWeb.InitializeSPRequest()
   at Microsoft.SharePoint.SPWeb.EnsureSPRequest()
   at Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web)
   at Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context)
   at Microsoft.SharePoint.SPContext.get_Current()
   at Microsoft.Office.Project.PWA.PJBasePage..ctor(String pwaUrl)
   at Microsoft.Office.Project.PWA.PJWebPage..ctor(String url)
   at __ASP.FastObjectFactory_app_web_viewsaddmod_aspx_ad835a1b_jhjrehvf.Create_ASP__layouts_15_pwa_admin_viewsaddmod_aspx()
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

So what does this error mean? Just googled and found some interesting answers for this problem :

Server error in application ... A potentially dangerous Request.Form value detected...

Cause :

The .Net Framework is throwing up an error because it detected omething in the entred text which looks like an HTML statement, like a brackets "<  >".

Hmm, 

The reason behind the error is as a security precaution. Developers need to be aware that users might try yo inject HTML into the URL which may affect how the form is rendred. For further details www.asp.net/learn/whitepapers/request-validation/.


To resolve this problem,  the "ValidateResuest" needs to be set to "false" so that the postback validation does not occur.

To disable request validation follow the steps below : 

     * Locate the "web.config" file and locate a line which may look like the following :


<pages validateRequest="true" enableEventValidation="false" />
    * Change the "validateRequest= "true" to "false"
    * Restart the IIS

If you are using framework 4.5 then entry in web.config (requestValidationMode = "2.0")


<system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" requestValidationMode="2.0"/>
</system.web>

Et voilĂ !

Hope this helps,
Oumaima

Tuesday, October 25, 2016

Waiting for Resources? – What happens when you provision a new Project Web Access site

Waiting for Resources? – What happens when you provision a new Project Web Access site

One problem I have seen a few times is the Project Web Access site provisioning running into issues.  If it fails completely then the error messages are pretty good – and you can generally resolve the issue and re-try and everything will be good.  
However, what do you do when it just sits on “Waiting for Resources” and nothing happens?  The quick answer is that this relies on the SharePoint Timer Service and a couple of Shared Service Provider services that can be viewed through Timer Job Definitions (Shared Services Timer Job and Project Server Synchronizing Job for ‘SharedServices1’ – or whatever yours is called). 
If these are not running then you will be “Waiting for resources” for a very long time!  Also there could be multiple versions of the timer jobs if you have multiple SSPs so it can get confusing, particularly as the first one does not differentiate by name.  (Clue – the JobId in the URL for the job is the Id of the timer job row in the Objects table in SharePoint_Config database, and the Properties column from this row will lead you to the Guid of the TargetSharedResourceProvider – which will be the Id of the Shared Services Provider also in the same table.)
So to dig a little deeper so you can understand where it might be stuck I’ll explain what is going on in the background which hopefully will help you find what is stopping it from working.
So, step 1 – you have been on the Create a Project Web Access Site page (CreatePWA.aspx) and entered all the details, and it goes back to the Manage Project Web Access Sites (ManagePWA.aspx) page and just sits there.  At that point a row has been added to the MIPScheduledJob table in the SharedService1_DB (your database name may vary – this is the default).  This is a pre-synchronizing job for the site, and is added to the database by the account running the Shared Services Provider application pool.
Step 2.  The Shared Service Timer Job picks up the row from this database table and adds a row to the SharePoint_Config database Objects table.  In the properties field of this table is some XML describing the site to be built, database names etc.  This timer job will run as the account of the farm administrator (i.e. the account running the OWSTIMER service)
Step 3.  The Project Server Synchronizing Job for ‘SharedServices1’ sees this row and actions it by creating the site, creating the database and then configuring the instance of PWA.  If everything is working you see the status change on the ManagePWA page as these different stages are processed, and finally it will say Provisioned!  Again, this timer service runs as the farm administrator.
Waiting for resources will be seen until the early stages of step 3.
So check all your services are running and your timer jobs are present and enabled and all should be good.
One other workaround that generally gets things moving again is to create  a new Shared Services Provider – which will then create new timer jobs and overcome any underlying issues.  The web applications can then be associated with the new SSP, the new SSP can be made the default if you are not using the old one for anything else, and the old one could be deleted.
I mention the databases here on the condition that you can look – but don’t touch! 
Hope this help,
Oumaima

Sharepoint Designer 2013, XSLT List View Options ribbon option is not showing

Sharepoint Designer 2013, XSLT List View Options ribbon option is not showing I have an ordinary Wiki Page, also tried making an Article...