CSPack 1.4 crashes with OutOfMemoryException - azure

I'm having a problem creating a package for a web role that totals up to 380 megabytes on disk. I can get CSPack to run fine when specifying the /copyOnly flag, but as soon as I try to create the actual package file I get an OutOfMemoryException. The problem started after I added around 350 megabytes of static content to the web role project.
I've already found a similar question here on Stack Overflow, but even with all the content set to "Do Not Copy," I still get the same issue with CSPack crashing. Just to verify that the static content is what is causing an issue, I excluded it from my project in Visual Studio and CSPack ran fine from the command line.
Here's the command I'm executing from cmd.exe:
"C:\Program Files\Windows Azure SDK\v1.4\bin\cspack"
BizBlimp.Azure\ServiceDefinition.csdef /role:BizBlimp;Build\BizBlimp
/role:BizBlimp.QueueWorker;Build\BizBlimp.QueueWorker;Biz
Blimp.QueueWorker.dll /sites:BizBlimp;Web;Build\BizBlimp /rolePropertiesFile:Biz
Blimp;properties.txt /rolePropertiesFile:BizBlimp.QueueWorker;properties.txt /ou
t:Build\BizBlimp.Azure.cpkg
And here's my project file for my web role: https://gist.github.com/88e776bb611cf6a8521e
I've been banging my head up against this problem for the last couple work days, so any help would be greatly appreciated.
Edit: Link to the same issue on the Microsoft Azure Forums. Looks like this is gaining some attention from an MSFT employee.

That is quite a lot of static content. Every time you update your application you'll have to upload that 350mb of stuff. Have you considered storing the static content in blob storage? It looks like most of it is images and would sit quite nicely there. I'm sorry this doesn't solve your crash issue, but it will probably make your life easier in the long run.

Related

Azure App Services Web App not registering update

I have a Azure App Service app that I'm trying to get deployed.
Today I ran into an issue where .NET informed me (via the yellow screen of death when I browse to the URL of my app) that I had a missing DLL (for the purposes of this question I don't think it really matters).
I used FileZilla to publish my changes in an attempt to do a manual deployment first and then work my way to automate it.
After so many attempts to fix it I later realized that the error message never changed. I did something more severe and renamed my bin folder into something completely different and the exact same error message would appear.
I've stopped the service, restarted it, and as mentioned, renamed folders, etc. and still the exact same error message persisted.
I also decided to open up the Azure Portal Console for my App Service app to browse a bit and to my amazement, nothing seemed to have reflected at all. The FTP shows one thing and the Console shows another.
Would anyone have any idea as to why this is happening?
I eventually got it to work and I will share what I tried.
I deleted the web app and created it again (I found this to be important the first time around). This was quite time consuming and did help but it wasn't long before the same problem happened again.
Then I finally found a solution that seems to give me consistent results:
I kept on editing the Web.config which seems to force a recompile and clear some sort of cache. So each time the web app stopped updating, I would make a slight change in the Web.config, upload it via FTP and the app finally updates.
If anyone has any more details on this, it would be greatly appreciated.

Debugging Azure Worker Role locally throws build error: Access to the path 'diagnostics.wadcfgx' is denied

I have a fully functional cloud service Worker Role that I have been using and debugging for a couple weeks now. I recently moved the solution into source control. I can build the solution still, but when I try to run it locally on the emulator to debug I get the error
Access to the path 'diagnostics.wadcfgx' is denied.
I have everything checked out to edit so I know it isn't a read only issue on the file. I can't figure out why this is happening or how to fix it.
My old version still runs locally on the emulator just fine. I have modified the projects in the solution and updated naming conventions of the roles and projects. My guess is that something was missed or a connection between the role project and the service project was lost... however I cannot figure out what it is.
Any ideas would be greatly appreciated.
My problem ended up being that one of the diagnostics.wadcfgx files was still marked as read only in the file system. The best solution was to remove the entire ECF folder from source control. When the project ran it recreated the directory and files needed.

Unable to publish node js site to azure using Visual Studio 2013

I am publishing my node js site to azure using this tutorial - http://blogs.technet.com/b/sams_blog/archive/2014/11/14/azure-websites-deploy-node-js-website-using-visual-studio.aspx
I get the following error, as mentioned in one of the comments on the blog, any idea what this error is about and how do I fix this ? I am able to run my app locally no issues with that.
Error: InvalidParameter
Parameter name: index
P.s : the site is like a very basic "Hello world" kind of site, this is the first time I am using and deploying to azure too.
I created a new project as a "Blank Azure Node.js web application", and replaced the resulting package.json and .js files with what I had before, and it publishes fine now
All was working fine for and suddenly got the error! I pretty sure it something in the project as it's now happening on vs2013 and vs2015 on different computers.
Its something to do with Templates after a lot of searching. For me Azure TFS CI got things working again if possible for you?
I had this issue with some projects but not with others, all created in a similar way. So I went thought every change and every setting I could until eventually i worked it out. I didn't want to give up and just remake them.
Basically its file paths, the first thing you notice is that it errors very quickly compared to a usual publish, the first thing that is triggered is a build but unlike heavy framework languages there not really much to actually build.
Like all builds for VS it pops out a bin folder take not of where this appears. This is the key, you want this to appear in the root of your deployment usually at the same level as the publish profile.
Before I moved my projects to VS, TFS and Azure, I used to use git and used the azure push and deployment as part of git, so I instinctively structured my folders in the similar fashion with src folder and all the extra VS baggage in the a directory higher.
This is where I noticed bin folder, so re-structured my solution and made changes to .njsproj (notepad) and moved to be inline with source code and re-added it yo my solution.
Technically speaking this a bug within VS as it allows to create the project and specify different locations which is all fine unless you want to build and publish locally.
Once you get your head around what is going on you should be able to solve this problem easily and not make the same mistake in the future. If anyone is still confused comment and ill grab some screen shots.

Azure Powershell Scripts Fail Siliently

I've been working with the Azure Powershell scripts from Microsoft over the last new days and am becoming frustrated with how often they seem to fail silently or give very misleading error messages. I have tried using the -verbose option, but this isn't very verbose.
Does any have any tips of things I can try to beef up the feedback when something goes wrong?
For example: Save-AzureServiceProjectPackage is reporting that the cloud_package.cspkg is created but no file is created on disk. If I delete my node_modules folder it works correctly and reports the same thing!
I've raised this direct with the team, but it appears the problem is with cspack.exe which the powershell calls: https://github.com/Azure/azure-sdk-tools/issues/2689
I had similar problems.
What didn't work: to install the latest SDK for Azure (Libraries for .NET and Azure Powershell)
What did work: to shorten the longest directory path.
For instance, in your deepest subdirectories, you delete everything not needed. Or move your $DEV_ROOT directory to the drive's top level. It's not a nice solution though.

Exporting big liferay portal into LAR-file fails with no sensible error message

I'm using liferay portal community edition 6.1-
I'm trying to export a portal in order to move the content to another intance of liferay. however, when trying to export the portal content the export fails with message 'Your request failed to complete."
When looking at log files, there is no sign of anything going wrong.
Could someone please explain to me what can possibly be wrong, and from where should I get the information for what is failing on server?
Marko
I've been digging into similar issues with the LAR importing/exporting system myself. There isn't much logging in that code unfortunately. I ended up enabling remote debugging in the server's JVM and stepping through the problematic tasks using the Eclipse debugger.
One of the main issues I've had with Liferay is that it swallows detailed exceptions, doesn't log them, and waters them down into very generic error messages by the time they're displayed to you in the UI. Using the debugger really helps because you can often see the original exception without having to dig too deeply into the code.
How's your free disk space looking on the server? I believe Liferay saves the LAR to a temp file as it works on it (at least, it does as part of the publishing process). On our test site, with only ten pages and almost no content, that temp file is still 3.5M. If your site is really big you might just be running out of space.

Resources