Block of concurrent connections

Hi, I'm trying block simultaneous connections.

What I've done so far:

I added a new column in the table called connection connected, who holds the values 1 or 0

When a user connects, it updates the value 1.

It will open a session to the user that has the status is 0.

When users click on logout, it gives the status 0

The problem

If the user closes the browser just, how is the system supposed to know that the user connected status should be 0?

I reasoned that the onSessionEnd method would do the trick. When the session expires, it simply updates the database for this user to 0. So I put in the code but nothing.

< cffunction name = returnType 'onSessionEnd' 'Cancel' = >
< cfquery name = "updateloggedstatus" datasource = "datadsn" >
UPDATE usermanagerlogin
The VALUE logged = < cfqueryparam cfsqltype = "CF_SQL_INTEGER" value = "0" >
WHERE userid = < cfqueryparam cfsqltype = "CF_SQL_VARCHAR" value = "user1" >
< / cfquery >
< / cffunction >

In another application, I used the onSessionEnd method succesully. I used it to remove items that were in the shopping cart, which were in the database, who stopped was not complete.

< cffunction name = returnType 'onSessionEnd' 'Cancel' = >

< cfargument = "SessionScope" required = True name / >

< cfquery name = "deletesessionendticket" datasource = "tickdsn" >
DELETE FROM tbltick

WHERE oid = ' #Arguments.SessionScope.oid # '.
AND ordered = < cfqueryparam cfsqltype = "CF_SQL_INTEGER" value = "0" >
< / cfquery >

< / cffunction >

The difference between the two is that the new application is developed in cf9, while the older app was built in cf8

In the current application, the session ends successfully, it asks me to login, but the onSessionEnd method is not executed.

Any ideas?

Very much appreciated.

n_kip wrote:

What I did is I tried to have the status of the logged on user to update on '1' just at the moment where the user connects and then update the '0' State when the user disconnects. When someone tries to use the same account from another place, and the status of this account is '1', that the user would not have recorded.

I strongly suggest that you go in the other direction.  Instead of not to allow the opening of the current session, put an end to the previous state of the connection.  Otherwise you're condemning those who may have logged on a computer, that they no longer have access from the possibility of using another computer.  For example, someone connects to work, go home and can not connect because they are connected to work.

What are you tryting to make in the case of OnSessionEnd?  HOW is - it does not work?

P. S.

Have you ever noticed significant differences between these two WHERE clauses?

n_kip wrote:

WHERE userid = 

WHERE oid = '#Arguments.SessionScope.oid#'

One uses a literal string 'user1', the other uses a variable "#Arguments.SessionScope.oid #".  Also the premiera would be using a variable not defined if changed to "#user1 #" while the other uses a variable in the "SessionScope' structure that is passed as part of the"Arguments"when the end of session event is triggered.

It is important to remember that the session event fires it is several extended variables that no longer exists, over the scope of the session itself.  The session is terminated, the scope is no longer valid.  So what was in the field of application is passed in argument of the function so that the data can be used in the event handler.

P.P.S.

I wanted to remind you of your original message that the event onSessionEnd has little or nothing to do with when a user closes a browser.  Your browser does not go back to all the web sites you have visited and each say "Kip closed me ', and you probably wouldn't want to do.  All servers can do is wait and wait and wait and if it receives no new applications containing known identification of an existing session data in a certain period of time then close the session.  It's the session end event fires and the onSessionEnd handler to be executed.

You CAN configure only the identification data--(CFID et CFTOKEN) or JSESSIONID - normally stored in cookies to "session cookies" which are only stored in memory by the browser and retired by the browser when it is closed.  So if a user opens a new browser connects to your server before the previous session has expired, the browser will present cookies previous but rather presented nine by the server, thus creating a new session.  And the old one will be left to die his timeout expires.

Tags: ColdFusion

Similar Questions

  • Recommendations of the RAM to 7000 concurrent connections

    Hi all

    I need your kind recommendations.

    We have installed oracle database enterprise edition 12 c on windows server 2012. the two 64-bit.

    We have 14000 students. We want to provide to 7000 concurrent user connections.

    How much RAM we forced to 7000 concurrent connections?

    What CPU is necessary?

    Concerning

    You have 2 possibilities to process client connections in the database - dedicated server and shared server (or a combination of both).

    Shared server has a smaller footprint resource wise. In dedicated server, each client connection is served by a dedicated server process. With a shared server, something like a 100 customer connections can be repaired by a pool of 10 shared server process. Shared server requires however a larger SGA as the UGA for a client connection must reside in the global shared memory, and not local in the process of shared server maintenance in this regard. Also, shared server is only really suitable for OLTP and not the customers of type OLAP.

    Shared server can drastically reduce the footprint of server for a large client connection resource base - if configured and used correctly.

    As for Windows. Oracle uses Windows threads. A process unique oracle.exe stops, and all the system processes (process monitor, writer of the db, etc.) and all (dedicated and shared server process) user processes running such as discussions in this process of exe. A thread has a minimum size imposed by the kernel - and a default size (often larger than the minimum) is defined by the process that created the thread.

    The last time I ran Oracle on Windows has been with Oracle 7.1 - so I'm not at all recent with Oracle running on the NT kernel. But I remember correctly, the Oracle default threads thread size is 2MB. Determine the current size and plug that number into the following discussion:

    So for a dedicated server, you'll need 7000 x 2 MB of memory for threads in dedicated server - which will develop according to the UGA and needs PGA of the session of customer served by this thread.

    If is considered shared server, you can try a pool shared of a 1000 servers, with a 100 dispatchers - (1000 + 100) x 2 MB of memory. In this case, the server shared memory can develop due to the needs of PGA. The UGA lies in the SGA however (so a larger SGA is required with dedicated server where the UGA is local and resides in the PGA).

    The average size of the PGA and UGA can be complex - because it depends entirely on the running of this process (shared/dedicated) server code. Lots of bulk code treatment? You can expect PGA and ramp up a lot as a binder in bulk and extraction in block needs memory to the process.

    Whatever it is, you need a 64-bit platform to a 64-bit operating system.

    Issue. Why Windows as a server database? Oracle Linux as the operating system is in my view, greater flexibility of choice ito, scalability and costs.

  • error "too many concurrent connections" with Gmail

    I started all of a sudden the error "too many concurrent connections" with Gmail with one of my gmail accounss. I googled and it seems like an old problem and I tried all the recommended solutions, but none worked. I have two gmail accounts and the other continues to function properly. Suggestions!

    Reduce the number of labels has solved this problem. Seems specific to TB and GMail (google says you can have hundreds of emails - I have about 60). There are mentions of which can be found via google - but no definitive statement on the problem, with workarounds, etc.. Now I will be anxious the next time I have to add a label, not knowing if it will work or cause this problem.

  • Number of concurrent connections to remote desktop on Windows Server 2008 and 2012

    Dear,

    Can someone help me with what is the maximum number of concurrent connections on Windows Server 2008 (Standard & Enterprise) and Windows Server 2012 as well.

    Kind regards

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Why the programs are blocked when I connect and why get signed in several places?

    Windows Live Messenger is blocked when I connect and sometimes Google Desktop.How do solve this problem? Also I was also signed in more than one place. Can you help me?

    Submit all Live queries on the forum right here:

    Windows Live Solution Center
    http://windowslivehelp.com/

  • Impossible to print to network printer with the firewall Windows blocks the outbound connection by default

    Hello

    I just installed a network printer.  The PC is on a private network.  The printer is the Brother printer and it connects to the wireless router via LAN.

    With the Windows Firewall, which allows outbound connection by default, I can print to the printer.

    However, if I change it to block the outgoing connection by default, I can print is more to it.  I've already activated in the preset group of Core Networking and sharing files and printer.

    In the Task Manager, a single exe comes from brother's installed file.  I've already activated a special rule for it and status monitor brother now shows the correct status of this printer.

    How can I find out what rules do I need to put?

    Thank you

    Answer seems simple.  The print spooler service (C:\Windows\System32\spoolsv.exe) must be added with the exception of outgoing.  I'm just surprised, that's not in the group for sharing files and printer.

  • In China, the surf is very slow because each site tries to load facebook or twitter in some way. Is it possible to block attempts to connect to twitter and facebook, so I don't have to wait up to 2 minutes to load a Web site?

    As you might or might not know, in China facebook and twitter is blocked by the national firewall. I don't care for this subject, but what is disturbing me it is that so many websites of the West try to connect to api.twitter.com or facebook, you can see in the lower right. Because here, the firewall blocks attempts, firefox continues to try for a minute or two, until he gave up and finally to display the content of the Web site. Is it possible that I can do to wait a response from this sites in firefox? It is initially blocked in my computer so I can have a normal surfing experience? I hope you understand the point im trying to make.

    Install Adblock Plus and add these filters for filtering rules.

    ||stumbleupon.com$third-party
    ||digg.com$third-party
    ||twitter.com$third-party
    ||twimg.com^$domain=~twitter.com
    ||fbcdn.net^$domain=~facebook.com|~facebook.net|~fbcdn.com|~fbcdn.net
    ||facebook.net^$domain=~facebook.com|~facebook.net|~fbcdn.com|~fbcdn.net
    ||facebook.com^$domain=~facebook.com|~facebook.net|~fbcdn.com|~fbcdn.net
    ||fbcdn.com^$domain=~facebook.com|~facebook.net|~fbcdn.com|~fbcdn.net
    ||addthis.com^
    ||gravatar.com^
    ||aolcdn.com^
    ||google-analytics.com^
    ||www.google.com/friendconnect^
    */friendconnect/friendconnect.js 

    AdblockPlus

    https://addons.Mozilla.org/Firefox/1865/

    In addition, read this:

    http://adblockplus.org/en/Getting_started

  • Not ios10 blocking VPN PPTP connections through personal hotspot?

    I use an iPhone 6 + and was upgraded to ios10, two days ago.

    While I don't have a configuration of the VPN connection on the phone, I connect my computer laptop personal hotspot of the iPhone to use internet and sometimes connect to a VPN.

    Before my upgrade to ios10, my laptop could still connect to the VPN while connected to the hotspot from my iPhone.

    After that I updated to ios10, my laptop does not connect to the VPN I connect to.

    I see reports that Apple has abandoned the use of the connection for PPTP VPN connections on ios10.

    But most of the people having problems seem to be people who connect to their phones directly to the VPN in the iPhone settings.

    In my case, my phone is just acting under the guidance of the internet on my laptop but it seems that it does not obstruct my laptop to connect to a pptp even connection if that should have no impact on the phone itself.

    I went down to ios9 and my laptop can connect again to the VPN.

    But now my Apple Watch does not work with my phone because I improved the watch to os3.

    Any ideas if there is a work around for the connection for pptp connections using the hotspon on ios10?

    Apple mentions alternative - Prepare for the removal of PPTP VPN before you upgraded to iOS 10 and macOS Sierra - Apple Support

  • You will need to disable the blocking of "this connection is untrusted.

    I don't know what happened, but lately, Firefox has become unusable. I can't even Google maps to work, and it's simply because of the following warning:

    =

    This connection is Untrusted

    You asked Firefox to connect safely to maps.google.com, but we cannot confirm that your connection is secure.

    Normally, when you try to connect safely, sites will present a reliable identification to prove that you're in the right place. However, the identity of this site cannot be verified.
    What should I do?

    If you normally connect to this site without problems, this error can mean that someone is trying to impersonate the identity of the site, and you should not continue.

    If you understand what is happening, you can tell Firefox to start to trust this site identification. Even if you trust the site, this error may mean that someone is tampering with your connection.

    Add no exceptions unless you know there is a good reason why this site uses no identification of confidence.

    =

    Not reliable? REALLY? Maps.Google.com is not approved! Oh, and support.mozilla.org is ALSO not reliable? I use Chrome for this post because in the case of support.mozilla.org, there is no option that allows me to the site.

    Virtually all the sites that I have this problem and Firefox is now all but unusable for me. And I'm on a company computer, is not as if I had a lot of options here. And this isn't our business network, because only a few of us have this problem.

    How can I work again and disable this 'feature' of Firefox?

    Thank you

    Unfortunately, fiddler2 certificates issuer may be a sign of unwanted software on your pc that is to intercept the secure network traffic. go to the system control panel and uninstall programs such as BrowserSafeguard, BrowserSafe, backup or other software that seems suspicious and did not get intentionally installed by you.

    Reference: https://support.mozilla.org/en-US/questions/982532#answer-520145

    afterwards, run a full scan of your system with security tools like the free version of malwarebytes & adwcleaner.

    Fix Firefox problems caused by malicious software

  • IQN concurrent connections

    I have a few non cluster Windows terminal server virtual machines running in vmware on a group EQ (ps6000 and ps6210xs). Virtual machines have connections iscsi volumes data on the equalizer. I'm restricting access to volumes by IQN of the terminal server that hosts, so I leave the "allow simultaneous connections from initiators with different IQN" unchecked for these volumes.

    I started implementing MPIO with HIT / ME a few weeks ago and today I noticed that some of these volumes of data have now the checkbox "allow simultaneous" checked. Is this something that happened during the MPIO configuration? Is it necessary, even if it's still only one IQN (multiple NICs) name?

    Hello

    That doesn't seem right.   However, you run the Setup Wizard remove and exclude the subnets of iSCSI SAN?

    You join an AD domain or change the host name after you have configured the iSCSI?  Even as a test, then add volumes later?

    When you connect to a volume, WIndows creates a static entry for the connection using the IQN name at the time.  If you later join a domain or change the host name, this static entry is not updated.  There the old hostname.   The HIT kit has the ability to create a new ACL on the fly if needed.  Either you put that one IP address, it detects the other one creates an account CHAP to another IP on the fly.

    What version of firmware EQL and HIT / ME software?

    Kind regards

    Don

  • NX3000 concurrent connections

    Does anyone know what a reasonable number would be for the maximum number of connections on a single nx3000?  I actually know the real storage will have an impact as well on this, but I need to know if the nx3000 could be a cause of a potential bottleneck.

    Thank you

    Kevin

    You are running Windows Storage Server 2008 on the NX3000? From what I could find in Windows Server 2008, the default limit is 16 777 216, which is, in effect, unlimited. In reality, the real storage will be dependent on your individual network configuration.

  • PP CC blocks - perhaps in connection with Mercury Playback and AMD / HD6950

    I had a lot of instability with my set-up.

    i73770K - 32 GB of RAM - HD6950 2 GB - Windows 8

    Computer has been and is very stable in all but the first Pro CC.

    I have clean re-installed Windows 8 and Adobe CC.

    I'm going to regularize with beta drivers 13.4 and 13.6.

    I think it's directly related to mercury reading because when I disable GPU acceleration and will software only, it does not crushed, but even on this pretty good system, it will not play well and it is a bit slow hogging all my CPU unless I use a lot of deception low display resolution.

    I have projects that threat, so I need to get to where I can change something soon.

    I suppose that here are my options:

    $1 $$ buy a more recent video as a HD7950 card. Maybe a new card would help? Or maybe the AMD drivers are a few sketches or support open CL is simply too new?

    2. $$$ buy a Nvidia card. Is there evidence that the Nvidia support is more stable and more mature?

    3. change on my MacBook Pro with HD6750M. It will simply not be as smooth and quick that my office with portable fans will turn off and all that. I prefer to use my beasty office.

    4. $$$ bail and just go FCPX on my Macbook Pro. It seems ridiculous because I am paid upwards to the CC workflow.

    I'd go with 2.  Reported problems with the latest nVidia 320 driver, but using an older driver 314 it works petty darn good.

  • How can I activate Firefox prevented this page from automatically redirecting to another page? This unfortunate thing has now completely blocked me connect to a Web site.

    How can I disable this message blocking? "firefox prevented this page automatically redirecting to another page.
    It used to be boring, but now he has completely blocked me to connect to a Web site.

    Tools > options > advanced > general...
    then uncheck the...
    I myself have this option because I stand bad pages themselves help to redirect to who knows what. Why can't you just go sites where I click?

  • Windows Microsoft Update KB 2509553 internet blocking and Remote Desktop connection.

    My computer is a client on a small business network.  Windows updates are made automatically from a server and deported to the customers.

    As indicated that I reduced to KB2509553 update which blocks connectivity network and internet.  Once I have uninstall everything works fine.  It's every night our automatic windows update on server causes this update to install again.  Every morning I have to go remove this update and restart the machine.

    I would like to know what needs to be fixed with this update for this update will not block the internet connectivity and network?

    Tip: Read the sections by vulnerability information http://www.microsoft.com/technet/security/bulletin/ms11-030.mspx (void)

    ~~~~

    Visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy. If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Buying to meet problems installing Microsoft security updates also can visit the following page for assistance: https://consumersecuritysupport.microsoft.com/

    For more information about how to contact your local Microsoft subsidiary for security update support issues, visit the International Support Web site: http://support.microsoft.com/common/international.aspx

    For enterprise customers, support for security updates is available through your usual support contacts.

  • WIFI connection blocked by the administrator (unexiosting)

    When I try to connect to a WiFi spot system blocked any WiFi connection with the following message. "Your network administrator has blocked you connect to this network '.
    But it's a PC that is private, with any network administrator.
    How can I turn off this blocking option.

    nfr2410, it's possible, especially if you have set up your computer to be part of a domain, when you did.
    To check if you are on a domain: click Start -> click right computer -> select Properties. In the System window, list information under the parameters name, domain and workgroup of the computer. Here you will see a side area if you are currently set up for one.

    Another thing to try is removing filters authorization via the command prompt, here are the steps:

    1. click on Start -> all programs-> Accessories.

    2 right click on invite and then click run as administrator . If you are prompted for an administrator password or a confirmation, type your password or click continue

    3. at the command prompt, type the following command and press ENTER:

    netsh wlan delete filter permission = denyall networktype = infrastructure
    netsh wlan delete filter permission = denyall networktype = adhoc

    Rami
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for