1

I have Windows 2008 Server 64 bits, Sql Server Reporting Services 2008 R2. I use ReportService web Service to upload RDLs files. I use script ps1 Powershell for upload reports like:

http://randypaulo.wordpress.com/2012/02/21/how-to-install-deploy-ssrs-rdl-using-powershell/

I get errors when uploading reports. The first 5 rdls is uploaded right, but next wrong. REP_ACCESO_AIRNET04_R_09, REP_ACCESO_AIRNET04_R_10, REP_ACCESO_AIRNET04_R_11, REP_ACCESO_AIRNET04_R_12 are uploaded right.

REP_ACCESO_AIRNET04_R_13 not, then I get the error.

If use 3-4 reports rdl, not problem. But using more rdls files, I get errors.

I check SQL Server Reporting Services and it is running

I get several errors in powershell, that uses my script ps1 to install - upload reports rdls in SSRS:

Exception of type 'System.OutOfMemoryException' was thrown.

Failed. The error was: 'Error al procesar los datos de un comando remoto. Mensa
je de error: <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/w
smanfault" Code="3762507597" Machine="DESCASRPSW01"><f:Message><f:ProviderFault
 provider="microsoft.powershell" path="C:\Windows\system32\pwrshplugin.dll"></f
:ProviderFault></f:Message></f:WSManFault> Para obtener m s informaci¢n, consul
te el tema de la Ayuda about_Remote_Troubleshooting.'.


Failed. The error was: 'Error al procesar los datos de un comando remoto. Mensa
je de error: The WSMan provider host process did not return a proper response. 
 A provider in the host process may have behaved improperly. Para obtener m s i
nformaci¢n, consulte el tema de la Ayuda about_Remote_Troubleshooting.'.

And logs in c:\Program Files\Microsoft SQL Server\MSRS10_50.REPORTING\Reporting Services\LogFiles

library!ReportServer_0-107!1118!08/09/2012-08:46:59:: Call to SetItemDataSourcesAction(/Reale/REP_ACCESO_AIRNET04_R_12).

webserver!ReportServer_0-107!7fc!08/09/2012-08:47:11:: i INFO: Reporting Web Server stopped appdomainmanager!DefaultDomain!14c!08/09/2012-08:47:16:: i INFO: Appdomain:152 ReportServer_REPORTING_0-107-129889682211300455 unregistered.

I active VERBOSE log and this messages key for me:

  • ReportServer_REPORTING_0-1-129889760220267707 is about to be unloaded.
  • ShutDownMessage: Change Notification for critical directories. bin dir change or directory rename
  • HostingEnvironment initiated shutdown
  • Change Notification for critical directories.
  • INFO: Reporting Web Server stopped
  • ReportServer_REPORTING_0-1-129889760220267707 unregistered.

pipeline=0x0000000000F1FA30, id=13907115651467581232, connid=13907115650930710318 ...

runningrequests!ReportServer_0-1!123c!08/09/2012-11:06:57:: v VERBOSE: User map'DESCASRPSW01\instalador http://descasrpsw01/ReportServer_REPORTING/ReportService2005.asmx?WSDL1'

rshost!rshost!123c!08/09/2012-11:06:57:: v VERBOSE: HttpPipelineCallback::EndOfRequest(): continue pipeline=0x0000000000F1FA30.

rshost!rshost!e3c!08/09/2012-11:06:57:: v VERBOSE: HttpPipeline::DisconnectCallback: releasing pipeline=0x0000000000F1FA30.

rshost!rshost!fbc!08/09/2012-11:06:57:: v VERBOSE: ThreadContinuePipeline: processing request on pipeline=0x0000000000F1FA30, state=2, IOError=0, node=0.

rshost!rshost!fbc!08/09/2012-11:06:57:: v VERBOSE: State machine disconnected pipeline=0x0000000000F1FA30, state=4 ...

rshost!rshost!fbc!08/09/2012-11:06:57:: v VERBOSE: HttpPipeline::DoStateDisconnected: releasing pipeline=0x0000000000F1FA30.

rshost!rshost!fbc!08/09/2012-11:06:57:: v VERBOSE: HttpPipeline::ReleaseOnce: releasing pipeline=0x0000000000F1FA30.

rshost!rshost!fbc!08/09/2012-11:06:57:: v VERBOSE: Destroying pipeline=0x0000000000F1FA30, callback=0x0000000000F1C660 ...

appdomainmanager!ReportServer_0-1!13e4!08/09/2012-11:07:03:: v VERBOSE: Appdomain:3 ReportServer_REPORTING_0-1-129889760220267707 is about to be unloaded.

ShutDownMessage: Change Notification for critical directories.

bin dir change or directory rename

HostingEnvironment initiated shutdown

Change Notification for critical directories.

bin dir change or directory rename

Change Notification for critical directories.

bin dir change or directory rename

Change Notification for critical directories.

bin dir change or directory rename

webserver!ReportServer_0-1!13e4!08/09/2012-11:07:03:: i INFO: Reporting Web Server stopped

appdomainmanager!DefaultDomain!b30!08/09/2012-11:07:08:: i INFO: Appdomain:3 ReportServer_REPORTING_0-1-129889760220267707 unregistered.

rshost!rshost!b30!08/09/2012-11:07:08:: i INFO: Application domain type ReportServer statistics: created: 1, unloaded: 1, failed:

UPDATE: the problem-issue is using PSRemoting and Get-Content for get bytes of a RDL file. The same script ps1 without PSRemoting is right.

For some RDL files, I get error using psremoting.

#Load the RDL Binary 
[Byte[]]$rptContent = Get-Content $rptReference -Encoding byte

Solution: use [System.IO.File]::ReadAllBytes($sourceFile)

References:

http://www.vistax64.com/powershell/203663-get-content-encoding-byte-problem-v1-v2-ctp3.html

Get-Content is very memory hungry and inefficient when loading binary file. Every byte gets wrapped intoPSObject. I suggest to use .Net functions (.Net v4 has File.ReadAllBytes method) – @user1578107

Powershell FTP Send large file System.OutOfMemoryException

"Having hit a similar issue myself with RAM usage hitting the GB's uploading a 3MB file, I found that replacing:"

 $content = gc -en byte $sourceFile

With:

 $content = [System.IO.File]::ReadAllBytes($sourceFile)
Community
  • 1
  • 1
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
  • looks like somebody or something is changing files/folders which belong to Reporting Services service. – user1578107 Aug 09 '12 at 19:44
  • the problem-issue is using PSRemoting and Get-Content for get bytes of a RDL file. The same script ps1 without PSRemoting is right. – Kiquenet Aug 10 '12 at 21:11
  • 1
    `Get-Content` is very memory hungry and inefficient when loading binary file. Every byte gets wrapped into `PSObject`. I suggest to use .Net functions (.Net v4 has `File.ReadAllBytes` method) – user1578107 Aug 11 '12 at 03:33

2 Answers2

1

This is NOT caused by someone renaming files or folders.

The main problem is your script is causing System.OutOfMemoryException

Try either uploading your reports in small batches or inserting a wait between attempts to upload.

Nathan Griffiths
  • 12,277
  • 2
  • 34
  • 51
  • `System.OutOfMemoryException` comes from powershell remoting, not from reporting services. – user1578107 Aug 10 '12 at 02:17
  • the problem-issue is using PSRemoting and Get-Content for get bytes of a RDL file. The same script ps1 without PSRemoting is right. – Kiquenet Aug 10 '12 at 21:09
1

Use [System.IO.File]::ReadAllBytes($sourceFile)

References:

Get-Content is very memory hungry and inefficient when loading binary file. Every byte gets wrapped intoPSObject. I suggest to use .Net functions (.Net v4 has File.ReadAllBytes method) – @user1578107

http://www.vistax64.com/powershell/203663-get-content-encoding-byte-problem-v1-v2-ctp3.html

"Having hit a similar issue myself with RAM usage hitting the GB's uploading a 3MB file, I found that replacing:"

 $content = gc -en byte $sourceFile

With:

 $content = [System.IO.File]::ReadAllBytes($sourceFile)
Kiquenet
  • 14,494
  • 35
  • 148
  • 243