Jump to content

Custom Web Publishing Issues


kfutter
 Share

This topic is 2424 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi folks,

 

I had a long explanation typed out for this one, but lost it with an errant mouse click, so I'll just cut to the chase, and back fill any info as required.

 

We're having major issues with our FMSA12 server bogging down under the load of too many CWP sessions (they vary from as few as 3 to as many as 127 from observations so far).

 

So, my two big questions are:

  1. What's the 'sweet spot' for setting the number of concurrent sessions?
  2. How much in the way of 'resource units' (memory, CPU) does each session consume on the server?

I no longer have the time right now to type out a long-winded background for this one, but please feel free to ask for any more information should you require it.

 

Kev

Link to comment
Share on other sites

  • 3 weeks later...

CWP sessions shouldn't persist - they should be opening and closing in millseconds.

 

Most likely there is a request that is taking a long time to resolve, and the other requests pile up behind it. I believe that FMSA12 is still single-threaded for web requests...

 

I'd check the logs to find the offending page.

Link to comment
Share on other sites

Thanks Tim. I've been over the logs many times (assuming you mean the FM server logs), and they're no help at all. I actually know the page and even the request that's causing the issue. I'm just trying to figure out how best to cope with it at the hardware level.

 

Kev

  • Like 1
Link to comment
Share on other sites

I actually mean the web server logs in this particular instance...

 

However, if you already know which request / page is causing this issue, then that's what needs to be addressed.

As I  said, I believe the WPE is single-threaded - so if you have a long request, then it impacts on all subsequent requests until it has been performed.

 

Cheers

Webko

Link to comment
Share on other sites

Yep, I believe there's nothing I can do about the situation at this stage. I'm pulling a lot of data out of several databases, some with related data, to load into a web portal, and up to 150 people can potentially be doing it at once. It consistently craps out at about 70 concurrent CWP connections, but often gets overwhelmed well below that. There are no data points I can drop and nothing I can rationalise or streamline. It's actually applications like these that expose the limitations of FileMaker as a web back-end, but I can't do anything about that either!

 

Kev

Link to comment
Share on other sites

What you can do is to spllit your table into several tables. and avoid running the query on a table  that has many relationships.

 

What I ended up doing is to export FileMaker's edited data every 5 or 10 mins to postgreSQL and/or MySQL depending on project.

Using XML export, that way you will have recid available, and FX.php or phpFileMaker can update directly from the web, this reduced the load of WPE.

Link to comment
Share on other sites

  • 1 month later...

Well, this issue has not been resolve so far, and in my searches for any clue or answer at all, I came across the following thread here:

 

http://fmforums.com/forum/topic/46682-web-publishing-performance-issues/

 

It's a similar issue to the one we're experiencing, though the last post was 2 years ago. The data I'm accessing is already in multiple tables, and that's part of the problem - up to 4 db requests to gather the required data, with up to 120 or more concurrent connections making these requests. This is data required for marking the roll at a school, and so it happens at the start of every period, and the bottleneck can last for 15 minutes or more. At this stage my only hope for a solution is to proxy as much of the data as I can in MySQL.

 

Does anybody know if FileMaker 13 fixes the single-threaded nature of the WPE? We'll be upgrading to it in the coming weeks regardless, but I'd like to know whether it's likely to improve the situation. In any case, it'll likely be our last FM upgrade.

 

Kev

Link to comment
Share on other sites

Is anyone actually reading this thread? Oh well. I'm wondering though how the hell FMSA 12 can be hosting nearly twice as many Custom Web Publishing sessions as the purportedly hard limit of 200. I set it to 200 just for giggles, and just witnessed it peak at 394. How's that even possible?

 

Even so, the WPE was still at a standstill, taking forever to output any data. I trawled through the IIS logs on the FM server, and could see tremendous wait times between IIS and WPE - up to 107 seconds in my sample log data. I'm at my wit's end with this problem, and really don't know where to go from here.

 

Kev

Link to comment
Share on other sites

  • 1 month later...

Hey Kev,

   We are having some CWP/PHP performance issues as well, although perhaps not on the scale you are.  A few questions for you:

 

*  Are you using secure connections (SSL/certificate)?

* Are you using Active Directory to authenticate to?

 

Every CWP hit requires a login, which can be part of the bottle neck.  We haven't solved our issues yet, but we a number of pages that come up blank or partially loaded, reports of authentication errors, etc. 

 

Another idea as far as your structure.  Are you purely receiving data from these requests?  That is, the end user already has a list of students (you mentioned attendance at a school) and then they are simply marking them off to send that back to the server.  Or does the list have to be downloaded each time?

 

I wonder if you could do something of a cache table; the list of students (assuming it will get pushed to the end user) probably doesn't change very often.  Can you build a scratch/temp/cache table that gets updated once a day, via a scheduled script?  Then the end user only has to hit one table to get the list of students, no relationships.  And then receiving the information can go to that same cache table to save the data; and then another scheduled script on the server scans that table every so often (once an hour) and slurps in that attendance data and spreads it around to the other tables that need it.  Makes sense?  A lot depends on exactly what you are doing, of course, and this may be over-simplified.  But it's somewhere to start, perhaps.

 

--  J

Link to comment
Share on other sites

Hi Justin,

 

Thanks for your input! To answer your questions, FM client access to databases is mediated by AD accounts, but the account used by the WPE is local to each database. I've had issues before where a particular database would simply stop responding to requests using that account, until I moved it to the top of the list in the "Manage Security" window!

 

As for the data being downloaded, it's not even trying to download students, just a daily timetable (though this requires up to 4 requests to the database). The system is designed to give teachers quick, web-based access to their classes. They can click on any class, and this will open the attendance roll in FileMaker for that class. The second part works really well, but grabbing that class list from FileMaker via WPE is the problem!

 

In any case, I've mostly solved the problem now, though there was no magic bullet. The solution mainly involved reducing the number of FileMaker queries to as close to zero as possible, so that the portal home page would not hang waiting for them. This was partly dealt with by moving the timetable off the home page, but where possible, I also proxied other data in MySQL, which mirrors your suggestion; it's a no-brainer with data that doesn't change regularly. The last major change was upgrading the server to v13, but it's hard to tell what impact that actually had, given all the other changes. All I can say is that, after doing all that work, the problem has dramatically improved, to the point of going away altogether, and I've had almost no complaints since.

 

So, the short answer is, don't use the WPE unless you absolutely have to!

 

Kev

Link to comment
Share on other sites

  • 2 weeks later...

It appears that much of our problem was getting slow responses from our AD server.  This is exacerbated by CWP because it has to log in every time you request data from the DB, so any time your PHP uses a form of the "execute()" method. 

 

I think that we have finally found a workaround for our problem, and you actually touched on the solution in your response: 

 

Move ALL the local file's account above ANY externally authenticated accounts.

 

I know it sounds weird, but here's a FileMaker Knowledge base article on it:

http://help.filemaker.com/app/answers/detail/a_id/7544/~/poor-performance-and-authentication-failures-when-accessing-files-via-external

 

The problem has been around for a long time (this article applies to 10, 11, 12, 13), but apparently FileMaker hasn't bothered spending any time fixing this. 

 

Now, this won't solve ALL login troubles.  A login attempt that uses an account that doesn't exist will still hit the AD servers and still wait for them to return a failed result.  While doing this waiting (which could be 10-30 seconds in our experience) ALL OTHER CWP requests will be put on hold.  It appears that CWP is single threaded...

 

I need to come up with a new mental-model of how authentication works.  The implication here is that FileMaker takes whatever was entered into the login screen and then compares that to the first account listed in 'Security', on down the list.  And then when it hits an entry listed as 'external' it goes and hits the AD servers?  But it doesn't hit them for every group, does it?  AD returns a list of groups that the user belongs to, I would assume that it remembers that list that is returned and doesn't have to fetch it again for every group in the Security list.

 

And why would having ANY local accounts down below the External accounts cause ALL login attempts to sometimes get long delays with AD?  It didn't necessarily matter if the account that was actually trying to log in was above/below the external accounts, but that if there were ANY local accounts down below.

 

Now, I am sure that I have some details wrong with all of my sweeping "ALL..." statements.  :)  But I am hoping that someone out there can help to clarify the details.

 

--  J

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Sorry to hear you're still having trouble Justin. So am I as it happens. We experienced some temporary improvements by reducing the number of CWP requests to as few as possible, but the problem has come back. Not as bad as it was, but still bad enough to frustrate many users, and cause overall performance to be very slow. I can't reduce the load any further without re-architecting some of our solutions, which is a position I'm rapidly being forced into.

 

I might try your suggestion and move all web accounts above the AD ones, but I'm not holding out much hope...

 

Kev

Link to comment
Share on other sites

I've just noticed something else about our beleaguered FileMaker server that bears mentioning. On the opening Status page of the Admin console,  the status for Web Publishing Engine keeps greying out, with the 'switch' moving to the 'off' position. At the same time, under Web Server above it, "XML is enabled" changes to "XML is disabled". I can ostensibly revive the WPE by moving the 'switch' back to the 'on' position, but the XML status remains disabled for several minutes before coming back.

 

This seems to be happening about every 10-15 minutes, sometimes more, and the number of clients (FM) or concurrent connections (web) don't seem to matter (ie, it doesn't appear to be a load issue, directly anyway). I'm assuming that the WPE comes back by itself too, if I'm not monitoring things - otherwise I'd come in every morning to find it off.

 

This is all getting rather desperate now, so if anybody has any clues about this, I'm all ears!

 

Kev

Link to comment
Share on other sites

Check the web logs... As per original observations, I strongly suspect you will find that there is a query that takes a long time to finish, and everything backs up behind that until it is finished...

 

Having been through this exact scenario on multiple systems. The errant PHP query needs to be found and refactored

 

Cheers

Webko

Link to comment
Share on other sites

  • 2 weeks later...

To some extent Tim it's the accrued weight of all the requests to the server that's causing the issues, but a few days ago a clue surfaced as to where I might find this one problematic query you speak of. This led me to a page that was averaging between 22 and 27 seconds to load, with me as the only logged CWP connection. By doing nothing more than removing all the non-required fields from the FileMaker layout this page was being fed from, I was able to reduce this average down to less than 2 seconds. Now, I didn't stop to look at any of the fields I removed, but I suspect some of them were calculations. Either way, a 12-fold improvement is amazing, and I can see how it would only take a couple of users (out of 1500) looking at this page to produce the results I've been seeing.

 

In the end I broke the page up into sub-pages via AJAX, to further lighten the load, and each query now loads its data set in under 1 second. I can't test this under load until February next year now, but I'm confident that this will represent a significant - and hopefully lasting - improvement in CWP responsiveness.

 

Some additional information: out of desperation, a week or so ago we contacted FileMaker support to get some direct assistance. While they couldn't help us directly, the information they passed on will lead to a server rebuild at our end. For starters, we are apparently using an unsupported OS to host our FileMaker server (FMSA 13), being Windows 2008 Server R2 DCE. Why the standard server is listed as compatible, and the Data Center Edition is not, no one could explain. I'm led to believe that the only difference is in the licensing, and the OSes are otherwise identical. In any case, we're obliged to change to a supported OS in order for FileMaker (the company) to render us any assistance.

 

The FileMaker support rep was also able to confirm that the hardware involved was under spec for high-volume custom web publishing. I'd seen the system requirements data for WebDirect on the FileMaker website, but the FM support rep confirmed that they're applicable to CWP as well. Since our current server rarely shows more than 50% utilisation for either RAM or CPU, even with CWP responsiveness at its worst, I had discounted the hardware aspect (though it had been given additional resources as part of this saga). The inference is that this ostensible anomaly with resource monitoring is part of the reason DCE is not supported. Again, we'll beef up the hardware anyway, since we can.

 

It would be nice to think that this then represents the end of this War and Peace epic, but as I mentioned earlier, I won't really know until school is back in full swing next Feb.

 

Kev

Link to comment
Share on other sites

The non-required fields is always a good move - in all my CWP systems, I generally build a layout for each function, with only exactly what is required.

 

I also never use portals (even if I need the related information) - because you can't predict how many rows might be in the portal...

 

And the XML returns *every* piece of available data from a layout. This killed one system, as the portal had about 1000 rows, all of which were returned from the query to a single record...

 

Anyway, hopefully what you have discovered and done will improve matters.

 

Cheers

Webko

Link to comment
Share on other sites

This topic is 2424 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Similar Content

    • By mleiser
      I go into my FM server like I always did before. The only difference is I'm coming in through teamviewer as I'm not in the office. I get this message and just don't know what to do:
      I get the following error message. Tried to push the button to start database on the top left and it's hanging.
      The database server is not available
      admin console functionality is limited to filemaker server overview and the log viewer panes.
      to use other functionality, the server administrator must start the database server again.
    • By Rich
      Greets, and a happy, holiday season to all.
      This is one of those "Well, I could swear it _used_ to work..." FMP (PC) problems: I want a script to create a custom-named folder on the desktop (PC) [for exporting data purposes] so I used the following (see attached) Send Event command: 
      "cmd /c md " & Quote ( Right ( Get ( DesktopPath ) ; Length ( Get ( DesktopPath ) ) -1 ) & "Job Chop-Chop! Backup" )
      ...in earlier versions of FMP--and if memory serves--it used to work. (See https://fmrift.wordpress.com/2010/02/03/creating-a-folder-from-filemaker-windows/ ). However, when I try to run the script in FMP v17.x the script fails with the following error message in the Script Debugger, "[3] Command is unavailable (for example, wrong operating system or mode)".
      So, I'm trying to figure out why the command's failing--could it possibly be it's because I'm using FMP (PC) in VMWare's Fusion PC emulator (v10.1.4, running in OS Mojave) instead of on a "real" PC? Any ideas for a tweak/fix?
      Cheers,
      Rich

    • By jrich4411
      Good evening people.  As the title states, I am a complete newbie to FileMaker Pro.  I've done some fairly extensive work with Excel, but this is my first experience with databases.
      For now, I'm looking for advice and suggestions.  I promise I will have plenty of "how do I... " questions later, but for now I need to pick a direction to go in with my new project.  I've spent a bunch of hours viewing Intro to FileMaker tutorials on YouTube and I've experimented with creating a couple test databases.  If this is not the correct forum for this question, please let me know.
      So, my wife and daughter are heavily involved with riding horses.  I've been drafted into being on the Board of Directors for our state Quarter Horse Association (Quarter Horse is a breed like Thoroughbred or Clydesdale).   The first thing I discovered is that they have NO association membership database of any sort.   What they do have is simply a file folder of applications for members, one folder for each year.  Me being an I.T. geek by trade, I know there is a better way.  I've at least entered the info into a spreadsheet (my specialty) so we have the info electronically to be able to reference current membership status during our shows.
      I wish to create a database for the membership, which I've done so far.  It has basic info - name, address, etc.  I have an ID field that automatically increments with each record - seems to be a strong recommendation in the tutorials I watched.  I have a field that combines the first & last name fields which I plan on using for looking up membership info, sending renewals, etc later.  I also have a membership year field and here comes my first question.  When I renew a member for the new year, I want to keep the previous year's record in the database - should I ever want to print a report for 2016 membership in 2019 for instance, I can.  So I figure I need a static member ID field that is separate from the record ID field I already have that can be linked to another database which will hold that member's horse information.   Is it possible to have a field that will increment serially when I add a new member but will copy from the previous year's info when I renew a member for a new year?  
      I'm looking for any and all suggestions - links to videos that might help - suggestions for a better way of accomplishing my goal, anything at all.   I'm not a programmer so I don't have that background FYI.
      Thanks!
       
      Jon
    • By vincenzo
      Hello, I am using l am filemaker 15 pro advanced in windows 10 computer (64 bit, 8gb ram).  I buy it few week ago and i converted my database from the old version fm5. The database work properly but it is very slow to open, about 60 second or more. I am working as standalone (no remote connection). I noted thta if the PC is offline (no network or internet connection) the database open in less that 6 second. It is very strange because I have not any ip configuration and any sharing option... what can be the problem?
      Thank you in advance
      Vincenzo
    • By Nestor
      Hi,  I'm importing records and have a date field that i need to use to set my Fiscal year, month, week based on the fiscal year starting February 1st and ending January 31st.
      Any ideas or sample i might be able to take a look.

      Thanks in advance.
       
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.