Recover webdav from .davfs2 - webdav

I lost my webdav server, but I have pretty much everything in my cache: .davfs2/cache. How can I recover the original filesystem from the cache so I can upload it to a new (more reliable, I hope) server? I haven't found anything about the structure of the cache. I've been afraid to try to mount using webdav for fear of torching the cache. Thanks!

Lacking documentation, you might need to read the source.

Related

Wordpress w3total cache: Disk, Opcache or memcache

I have a wordpress site that has about 200.000 pages views everyday. I run this on a VPS with 6GB ram. I have w3total cache installed right now but the page is still loading slow.
What i am wondering now is what cache should i use for my site Disk, Opcache or memcache, and should i use one on alla or how should i set it up? currently i am using basic disk cache only.
My question is basically, should i change anything, and if yes to what? or should i just stick with basic disk caching as is ?
I have not yet tried to change anything so i dont make it worse as i am quite unsure.
The answer to this question is effectively 7 years old, so I'll update the answer here. Please note that I am assuming that you are using W3TC for your website.
Disk Cache
Disk cache can generally be used for website with low/medium traffic. One of the problems with high traffic website is that Disk Cache gets corrupted if you use it with Object Cache and Database Cache.
On a medium/high traffic website running on a single server I would recommend the following:
Page Cache : Use Disk Cache Enhanced
Object Cache : Use Memcached
Database Cache : Use Memcached
OPcache
OPcache stores the compiled PHP code in the memory and definitely increases the code execution speed.
It is important to understand that the OPcache is a PHP Code Cache and does not store any pages, database queries or objects.
You can read more about OPcache here:
https://www.sitepoint.com/understanding-opcache/
MemCached
Memcache stores data in the RAM as key-value pairs and definitely improves the speed of the website as accessing the memory is much faster than accessing the Hard Disk.
Please note that MemCached will increase your memory usage significantly so it's definitely worth trying different configurations on test environment.
You can read more information on how to install Memcached on a Linux Server here: https://easyengine.io/tutorials/php/memcache/
Hope this will help :)

Any tool for WebDAV load testing?

I want to generate WebDAV traffic (to reproduce a bug in an open source server).
I know WebDAV is a layer over HTTP so I could generate such traffic by reading the protocol specification and sending tens of hand-crafted HTTP requests, but I don't want to re-invent the wheel, I guess someone has already written such a tool?
Ideally the tool would:
Log in at a URL
Randomly navigate directories
Download/upload files from time to time.
Bonus if it is free/open source.
This discussion suggests JMeter does not have this feature.
I found a tool called "Prestan" on Sourceforge. It's based on this paper by Teng Xu
There was no such tool, so I wrote one.
Mecadaver logs in at a WebDAV URL, and starts navigating directories at random, sometimes downloading documents, sometimes going back to the root.
Runs as as many users as you want (you provide a list of usernames/passwords in a CSV file)
Various parameters to make the load more intensive or less intensive.
Open source
Note: Silk Performer can do WebDAV test loads as well, but it is very expensive.

How to set up memcache on nginx+fastcgi

On an ubuntu server, I have a drupal site which uses nginx+fastcgi as webserver and uses xcache. I am quite happy with the configuration but trying to set up memcache hoping to boost the site's speed, but I am not sure how to do so.
After installing memcached, i added extension=memcache.so to /etc/php5/cgi/php.ini and I see that memcache process is running.
However, after a few hours, instead of better performance I just see higher server load (average 5 instead of usual 2). So I appreciate your hint to set up memcache. (I know that I could use nginx as reverse proxy to apache, and define memcache on apache but I am particularly keen to avoid apache by any means).
Memcache is just key-value storage. It's useless, if your application doesn't know, how to use it.
By adding extension=memcache.so to php.ini, you are only enable memcache api in php.
After that, you must teach drupal, how to use memcache, to store some data in it.
I don't realy know, how to configure drupal to use memcache, but i think, it's very possible, and may be vary easy. Just look to some configuration files of drupal.
Pretty late to the game here, but if you're only on one server, memcached is just going to slow you down. Look into caching locally with APC (or, in your case, xcache's local caching). I'm sure Drupal will have plugins for these. My guess is you're using xcache for an opcode cache, but not using its memory cache abilities.
Any type of caching is not a silver bullet. Like CyberDem0n mentioned, your application has to be smart enough to use it: "cache this, don't cache that, pull this from cache, etc etc."
Memcached is great only if you are dealing with multiple servers and need a shared cache. If you have one server, you are wasting time with the overhead of a network call when you can just get the object out of memory (or even filesystem, which is faster than network in most cases).

Storing pictures in MySQL - Smart?

I know this is an age old question, and usually you can't get a simple answer.
However, I'm in the situation where I might need 20gb of storage for pictures on a collaborative web app I'm creating using ASP.NET MVC, but my web host doesn't give me more than 4gb of storage. However - I have unlimited space on my MySQL DB, so I'm seriously considering using the longblob or something in the MySQL DB as storage - can anyone give me a couple of reasons why not go this way? The alternative would be a very expensive host, or a possibly equally expensive solution with cloud storage (I'm thinking Amazon S3 or something).
Thanks!
Not smart. Because unless your webhost is very dumb, they will notice and tell you to stop being silly.
"Unlimited" very rarely actually means "unlimited".
This is not much lines of code, try and check what solution is better for you problem.
I think if you have unlimited DB Storage and you doesn't matter on bandwidth between database server and run time environment then probably this solution might be better for you.
It's not really an age old question with no simple answer - it's simply inappropriate to store image data in a database.
Using it as a workaround for limited disk space is simply going to cause other issues, such as the fact that it'll be a lot slower to load and it's likely the hosting company will pull the plug once they realise what's going on. (If they're the kind of company that limits you to 4GB of local disk space, then I also have to wonder whether their MySQL set up will cope with serving up image content.)

Can you solve my odd Sharepoint CSS cache / customising problem?

I have a weird situation with my sharepoint css.
It is deployed as part of a .wsp solution and up until now everything has been fine.
The farm it deploys too has a couple of webfront ends and a single apps server and SQL box.
The symptom is that if I deploy the solution, then use a webbrowser to view the page it has no styles, and if I access the .css directly I see the first 100 or so bytes of the .css.
However if I go into sharepoint designer and look at the file it is looks fine, and if I check it out and publish it (customising the file but not actually changing anything in it) then the website works fine and the css downloads completely.
There is some fairly complex caching on the servers Disk based and object caches. as far as I can tell I have cleared these (and an issreset should clear them anyway... shouldn't it?)
I have used this tool to clear the blobcache from the whole farm http://blobcachefarmflush.codeplex.com/
The problem you're describing is one I've encountered before. Let me share what I know, what I suspect, and how I'd go about troubleshooting your scenario.
First off, it sounds like you suspect caching as a potential problem source. In the case of the MOSS publishing feature set, you really have three different cache mechanisms in operation: the object cache, the BLOB cache, and the page output cache. The only mechanism that should be in-play, assuming it's turned on with default settings, is the BLOB cache. Neither the object cache nor the page output cache should be touching stand-alone stylesheets like you have.
You've tried flushing the cache the flush using the farm-level BLOB cache flush feature, and that will instruct MOSS to dump all BLOB cache data. You can verify this by reviewing the file system to ensure that only the three .bin folders remain following a flush.
To your specific question regarding an IISRESET: no, and IISRESET actually won't clear the BLOB cache. The contents of the BLOB cache persist beyond the life of the application pool servicing the web application. You either need to use a feature to clear out the cache (as you have been), or perform a manual file delete. I don't recommend the latter unless you absolutely have no other course of action. If you do elect to go the manual route to try it, ensure that you shutdown the W3SVC service before deleting files out of the file system. If you don't, the actual file deletion process can get into a race condition with cache repopulation and lead to corruption. After you've deleted files with a stopped W3SVC, you can start the W3SVC back up again.
For more information on the internals of the BLOB cache and how it operates, I'll point you to a blog article of mine: http://sharepointinterface.com/2009/06/18/we-drift-deeper-into-the-sound-as-the-flush-comes/
To see if the BLOB cache is a factor in the behavior you're seeing, you can modify the web.config for your web application(s) and adjust the file pattern to remove CSS from the list of file types in the <BlobCache> element and then restart IIS (or at least recycle the app pool).
Another possibility, based on experience, is that you're seeing something other than BLOB cache abnormalities. The key observation for me comes in the form of you observing that a direct request for the CSS stylesheet returns only the first 100 bytes or so.
Do you, by any chance, have any intelligent network hardware (that is, intrusion detection hardware or anything that might be performing application/layer-7 filtering) between the WFE and you, the caller? Intrusion detection and IPS systems are the source of many of the types of problems you're seeing, and they're one of my first stops whenever I see "oddball" behavior like you're describing. In the case of one of my clients, I saw a problem meeting your description (CSS and JS files getting truncated) due to an intervening Juniper firewall with active IPS. Turning off IPS (to test) cleared things up immediately. After that, the networking team sought an update from Juniper to correct the issue to ensure that IPS could remain active.
Try turning off BLOB caching (or removing the CSS extension from the file pattern) to see if that makes a difference. If not, talk to your network team to see if something is happening to the response stream coming back to you. That's where I'd start; hopefully, one of those two things will do the trick for you.
Small side note: if you have a free moment and are up to it, I'd like to hear about your experience with the BlobCacheFarmFlush solution you pulled down from CodePlex. I authored it, and I'd love to hear your thoughts -- good or bad :-)
Sean (sean#sharepointinterface.com)

Resources