FoxPro sometime doesn't find files in the LAN - networking

Sometimes a visual FoxPro App doesn't find files in a FileShare, which are there.
for example when checking in a loop File() on a existing file on a Network share about 5% of the tries don't find the file.
This works on most machines but sometimes it doesn't work. In the curren scenario I've a Windows Server 2K8 as file server (perhaps a SMB2 issue?)

I would patch your 2K8 server to SP1 (and any Windows 7 clients too), this will take care of any SMB2 issues. Those issues were around CDX index file corruption, though.
It's also possible that this is due to the caching that SMB2 uses, which can produce 'File Not Found' errors. The client registry settings involved are:
FileInfoCacheLifetime
FileNotFoundCacheLifetime
DirectoryCacheLifetime
There is a discussion regarding this on Alaska Software's website, and a useful MSI installer which can be run per workstation to adjust the settings. This company produces a product called Xbase++ but I would guess it is close enough to Visual FoxPro in terms of low-level file IO and locking.

Not positive if its an issue of Fox, or your network. Going way back in time, I had a client that had problems somewhat similar. Took Foxpro out of the equation and just used Windows Explorer and it would hang for a moment. It ended up that their network cards were set to energy saving mode and would basically time-out / shut down due to inactivity. The network drive share would apparently be released. Until the network card would re-connect and get established again, they had issues. By changing so the network card NEVER went into energy save mode, problem went away for them.

Yes. I have versions of fox pro deployed on various different servers, with various versions of windows server and never experienced an issue as described.
Maybe you could try a similar test using a different programming discipline, .Net , access, Ruby ...., etc
Post you test loop, just out of interest ?

Related

Umbraco, memory. How to find the cause?

Since two weeks we have a problem with one of our websites, in „rush hours” (Analitycs shows ~170-200 people in real-time) it consumes all available memory (16GB). Normal state is between 2-3GB allocated. Memory growth isn’t constant, sometimes is very rapid, like 4-16 GB/2 min, another time growth is gradual. This behaviour looks the same on both of our servers (Server1 and Server2).
Server configuration:
Traffic between public internet and the actual application servers is being handled by haproxy, currently all traffic is directed to Server1, if Server1 stops responding traffic goes to Server2 (active –backup configuration). Website database (MSSQL 2008 R2) is placed on Server3. On Media server we store all files from application virtual /media folder. That server is powered by Linux and no problems here.
Server1, Server2, Server3 are VMs placed on one physical machine (Linux Debian KVM, latest version of libvirt from backports, machines are rock-stable, especially the DB Server). Media server is a physical storage machine.
Server1:
OS – Windows Server 2012 Standard
CPU – 8x2GHz
RAM -16GB
IIS8
Server2:
OS – Windows Server 2008 Web
CPU – 4x2GHz
RAM – 4GB
IIS7
Common things for both servers:
Site is based on Umbraco 4.7, .net 4.0. Media folder is connected as „network location”
physically placed on Media server (Linux Samba 3.x). In database we have about 25000 nodes.
We observed that website intensively use connection with Media server (up to 200Mbit/s).
We have changed the URLs so that media requests no longer pass through IIS.
Website was moved beetwen Windows Server 2008 and Windows Server 2012, yet the problem remains.
We thought that problem lies in the code, so we rolled back all the changes since last month (using our code repository), that didn’t solve the problem though.
We already have used programs such as DebugDiag and Ants Memory Profiler
http://imageshack.us/a/img823/8151/p4performancemonitor.png
http://imageshack.us/a/img838/2319/p4tasks.png
How else can we check where the problem lies?
Here are some things to check for that I've used when I've had memory issues in the past with Umbraco sites:
1) Is the site using Linq 2 Umbraco in the code anywhere? This has quite a few problems with memory usage, especially under heavy load, so it's possible that this could be the cause of your problems. If you are using it, look at your code for inefficient Linq queries, and consider replacing the code with something using the Node API or XSLT instead.
2) Is the site running any custom .net code that uses the Document API on the front end? In general this can be pretty slow and resource intensive, and should be avoided if possible on the front end (back office is fine).
3) Check any other custom code for potential memory leaks or inefficient use of resources.
4) Have a look through the old issue logs for Umbraco (can't find a link at the moment, sorry!), that should give you an idea of whether you're experiencing a known issue with that particular version of Umbraco. If it is, you may need to upgrade (which may or may not be a major hassle depending on your Umbraco setup).
Hope that helps!

How to detect a timeout in a .net application that is not resulting in an error, just an 8 second delay?

I've got a Windows 2008 Enterprise R2 Server running Ektron 8.02 SP3 that is causing me some trouble that I can't diagnose.
So my question isn't for a solution but simply how to better profile a .net application / windows server. Whenever you try to POST a form built by the software, it takes 8 seconds and change to return the page (on this specific server, it doesn't do it on other machines with the same codebase). It appears that it's trying to make a connection to something for 8 seconds, fails, then returns the page without error. Some more facts:
This is a beefy VM that is not being over utilized
The database is running on the same machine, so there is no lag there.
The 8 second delay even happens when submitting from the server itself
The event viewer for the server doesn't report any errors that seem related
Profile MSSQL doesn't report any issues either
Microsoft Network Monitor doesn't report any glaring networking issues, though its hard to say as the tool doesn't report long connection attempts clearly (from what I've seen of it)
I feel sufficiently confident that there is some process during the form POST on the server that is trying to make a connection somewhere, failing, and continue through the rest of the process. It doesn't report any errors and the forms all submit fine.
So, all that being said, is there anything else I can do to debug this? I feel like I'm shooting in the dark. Thanks for any help you can offer.
It sounds like this isn't an application you wrote. If so, the potential solutions are different.
A first level step would be to use Windows' Performance Monitor. Select the options (process and/or performance attribute to watch), then run the process through its paces.
If Performance Monitor can't help, you'll need to get into the real guts of the app. Most likely this will be more difficult than you want unless you're writing the app. You can debug a .NET app that is not your own using Reflector (paid) or ILSpy (free). HOWEVER, this can violate the license agreement (and likely does if the app has been purchased).
Apart from that, you're going to need to contact the product developer if you want to both stay sane and find this problem quickly.

Replacement for Hamachi for SVN access

My company has been using Hamachi to access our SVN repository for a number of years. We are a small yet widely distributed development team with each programmer in a different country working from home. The server is hosted by a non-techie in our central office. Hamachi is useful here since it has a GUI and supports remote management.
This system worked well for a while, but recently I have moved to a country with poor internet speeds. Hamachi will no longer connect 99% of the time - instead I get a "Probing..." message that doesn't resolve. It's certain to be a latency issue, as the same laptop will connect without problems when I cross the border and connect using a different ISP with better speeds.
So I really need to replace Hamachi with some other VPN/protocol that handles latency better. The techie managing the repository is not comfortable installing and configuring Apache or IIS, so it looks like HTTP is out. I tried to convince my boss to go for a web hosting company, but he doesn't trust a 3rd party with our source.
Any other recommended options / experiences out there for accessing our SVN repos that would be as simple as Hamachi for setup; but be more tolerant of network latency issues?
Perhaps it's a bit much to ask of your team, but if you have a distributed team then you could switch to a distributed version control system (eg. Mercurial or Git). These don't need to use the network so much and you won't suffer from latency problems. It is an entirely new paradigm though and your team's development processes will have to change, so you might not consider it appropriate in your case.
First I should ask why you need a VPN in the first place. Subversion can operate over HTTPS, so as long as you open the proper port on the server there shouldn't be any security or connectivity issues.
Assuming that you do need a VPN, I find it difficult to believe that an administrator uncomfortable with Apache would be more comfortable installing a whole new VPN system (much more complicated and tricky, in my estimation).

System.Data.OracleClient requires Oracle client software version 8.1.7

I have the same problem as the poser of this question:
System.Data.OracleClient requires Oracle client software version 8.1.7
I have made the changes to the security settings on the oracle folder, and have to wait for the server to reboot overnight.
My question is why is this reboot necessary? I am getting the same error after making the changes without rebooting, so I don't doubt that it is. Is there an alternative to rebooting the server, like IISRESET? (Although I wouldn't be allowed to run IISRESET during the day either)
Perhaps not an answer to your specific question, but for the record it is for this kind of reasons that I always favor Oracle Instant Client :
You don't have to install anything on the target machines (including dev boxes !). So no tricky manual setup and goat sacrificing.
You can make sure that your application will run with the specific client you picked (version, x86/x64).
You could even easily have multiple applications work with different client versions on the same computer.
As a downside, it adds a significant weight to your application (~19Mb minimum), and you can't participate in distributed transactions.
If you still can switch, this is the way to go IMHO. Check What is the minimum client footprint required to connect C# to an Oracle database? for more information.
Starting with Server 2003 (hosting IIS6) it is enough to restart the service to bring environment changes and security changes into effect.
But this is done with iisreset. What is not allowed too.
Thats a pity, I see no other way as wait.

Can Windows Web Server 2008 be used to host games?

I'm currently using a linux server, we run a couple of web sites of it, PHP apps with MySQL, the usual. Since the server is privately owned by some friends and myself (we do have it hosted at a professional datacenter though), from time to time we also use it to host our smallish counter-strike source and call of duty 4 matches by running the released dedicated game server packages.
I've recently subscribed to DevExpress' excellent WinForms and ASP.Net component suite, and is contemplating moving to Windows to make use of those ASP.Net components. I'm currently trying to decide between the Web and Standard editions of Windows Server, since there is a difference of nearly a thousand bucks (where I come from)
For Windows Web Server 2008, Microsoft has softened the database server restrictions and made it clear there is no need for CALs. But would one be able to run the above mentioned web servers? I've been googling and searching through forums to no avail.
Need some help before I plunk in the cash.
Thanks.
Before I give any opinion, I'll start by answering your core questions:
Yes, you can run dedicated game servers on Windows Server Web ed.
The differences between web and standard:
Web only supports 2 gigs of ram. Standard in 64bit mode can support 32gigs (and more?).
Standard comes with more things that are better suited to local server environments (eg: active directory). If you want LDAP controlled Exchange email, you'll need Standard. Most web server don't need these.
Web (apparently) won't support full-on SQL server versions. Express should run though.
Opinion time.
Dedicated and virtual dedicated monetary overheads on Windows servers are a lot... To the degree where you're paying more for the software than the hardware costs, at least for the first year.
Renting the software (as part of a managed dedicated server or VPS) is initially a lot cheaper, but over the course of a couple of years, will cost you about the same and if you run it longer, it'll eventually cost you more.
Shared Windows hosts can be good. I've been with a company called Hostek (Florida-based) and they've bent over backwards to make hosting a fairly busy site (around 6000 uniques a day) very cheap for me. It can also be atrocious. I've had bad hosting companies too. Shop around.
About a year ago, I dropped Windows at home in favour of Linux. I'm not going to enumerate the many benefits and drawbacks; I'll just tell you that that's when I stopped doing .NET in favour of more open Frameworks. I'm not using Django (a Python-based web framework). While you might not like it (or other frameworks - eg Ruby on Rails), I plead that you do check out what's happening in the open-source world before you plonk for anything Windows related since you already have the infrastructure available for hosting Django/Rails/et al.
If you wanted your own Linux server, VPSs start from around $20pcm. As I said before, severely cheaper than Windows counterparts. I now use Linode to host everything new I make. Highly affordable and they'll easily run dedicated games like your current set-up does.
Mono isn't an option for you. Not yet anyway. It does go some length to help people migrate their applications but it's still pretty sketchy on the ASPNET front. And as a comment says on another answer: the controls you want to use are strictly Windows-only for the moment.
Linux will consume fewer baseline resources than Windows will. On an old server (Windows 2000, IIRC) I had to administer, the core of Windows would consume anywhere from 100-200 megs of RAM. My current Ubuntu server eats 40megs. I'm not sure how much RAM you have to play with on your server but if it's a lower amount, you're going to fit a lot more on a Linux host. (Remember that if you have more than 2gigs, you don't have the choice of the Web Server edition)
It's clear from this that I'm a complete Linux super-enthusiast, but I know my needs differ from yours. ASP.NET is a great platform but it costs a lot of money even if you're splitting it between friends. You could opt for Windows... Or you could go Linux, donate a bit to the projects you use and buy a new plasma or something shiny for the lady.
SPLA? Isn't that for service providers? My friends and I use the hosted services for ourselves (games, email and web), though of course our web sites are publicly viewable by all; but I think that hardly qualifies as "providing a service"?
Unfortunately, staying with Linux would make it such that I would not be able to use my DevExpress components, which is my reason for considering Windows Server in the first place. .NET may be partially supported by Mono, but not fully, and DevExpress makes use of certain features of .NET that aren't (at least as yet) supported by Mono.
We also already own our own dedicated server, so are only looking for a suitable OS.
Still, your reply is appreciated.

Resources